You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public void bar(int);
descriptor: (I)V
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
0: aload_0
1: iload_1
2: invokestatic #20 // InterfaceMethod bar/Barly.bar$:(Lbar/Barly;I)V
5: return
LineNumberTable:
line 9: 0
LocalVariableTable:
Start Length Slot Name Signature
0 6 0 this Lbar/Bar;
0 6 1 v I
MethodParameters:
Name Flags
v final
Now
Do the same thing after cleaning up the out directory and changing to
defscalaVersion="2.13.16"
in the build.mill
.....
public void bar(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
0: aload_0
1: iload_1
2: invokestatic #18 // InterfaceMethod bar/Barly.bar$:(Lbar/Barly;I)V
5: return
LineNumberTable:
line 9: 0
LocalVariableTable:
Start Length Slot Name Signature
0 6 0 this Lbar/Bar;
0 6 1 v I
RuntimeVisibleParameterAnnotations:
parameter 0:
0: #14()
foo.Foo
MethodParameters:
Name Flags
v final
Expectation
The expectation is that RuntimeVisibleParameterAnnotations remain in the scala 3 .class file as seen in the scala 2 .class file.
IE This section not seen in scala 3 but occurred in scala 2:
Of course the javap output is reflecting that the runtime method parameter annotations are not present for the trait method in the scala 3 compiled file. This is a problem trying to convert a scala 2 application.
The issue has occurred with use of Java Jersey JaxRS annotations for a web project trying to convert from Scala 2 to Scala 3. Nothing works in Scala 3 regarding traits with JaxRS annotations on methods required in subclasses.
It is further observed that the issue is with trait methods parameter annotations and not in class methods parameter annotations.
For eg adding a bar2 method to the class as:
....
classBarextendsBarly{
defbar2(@Foov: Int) = ()
}
has following seen with javap output
....
public void bar2(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=0, locals=2, args_size=2
0: return
LineNumberTable:
line 10: 0
LocalVariableTable:
Start Length Slot Name Signature
0 1 0 this Lbar/Bar;
0 1 1 v I
RuntimeVisibleParameterAnnotations:
parameter 0:
0: #23()
foo.Foo
MethodParameters:
Name Flags
v final
Thank you for the attention.
The text was updated successfully, but these errors were encountered:
Compiler version
3.6.4
Minimized code
Output
Run
.....
Now
Do the same thing after cleaning up the out directory and changing to
in the build.mill
.....
Expectation
The expectation is that RuntimeVisibleParameterAnnotations remain in the scala 3 .class file as seen in the scala 2 .class file.
IE This section not seen in scala 3 but occurred in scala 2:
Of course the javap output is reflecting that the runtime method parameter annotations are not present for the trait method in the scala 3 compiled file. This is a problem trying to convert a scala 2 application.
The issue has occurred with use of Java Jersey JaxRS annotations for a web project trying to convert from Scala 2 to Scala 3. Nothing works in Scala 3 regarding traits with JaxRS annotations on methods required in subclasses.
It is further observed that the issue is with trait methods parameter annotations and not in class methods parameter annotations.
For eg adding a bar2 method to the class as:
....
has following seen with javap output
....
Thank you for the attention.
The text was updated successfully, but these errors were encountered: