Internal "Wrong number of arguments" error when reading a Scala 2 annotation in a macro #22200
Labels
area:metaprogramming:reflection
Issues related to the quotes reflection API
area:pickling
compat:scala2
itype:bug
Compiler version
Scala 2: 2.13.14
Scala 3: 3.3.4
Minimized code
Compiled with Scala 2:
Compiled with Scala 3, with results of the above on the classpath:
Macro.scala:
Main.scala:
Output
Expectation
No error.
An interesting observation: this bug does not happen when the annotation argument is not a list. Also we do not return from the macro instantly as we see the error, instead still printing out the tree and ending compilation when we leave the macro.
The text was updated successfully, but these errors were encountered: