Macro-annotated class with expressions (not defintions) in their body produces compilation error #19539
Labels
area:metaprogramming:macro-annotations
itype:bug
regression
This worked in a previous version but doesn't anymore
Milestone
Compiler version
3.4.0-RC2
3.4.1-RC1-bin-20240125-453658b-NIGHTLY
Minimized code
Output
The code produces the following compilation error:
The macro annotation just returns the input tree without any modification.
The tested class only contains a single
println()
statement, which triggers the issue. Both Scala 3.3.1 and 3.3.2-RC1 compile without an error. It would be nice if the issue would not make it into 3.4.Expectation
The code should compile without errors.
The term
println
indeed has the ownerPredef
and notTest
(as the error message says). Yet, this is expected, not an error.The text was updated successfully, but these errors were encountered: