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
fix scala 2 macros in traits with type parameters (#18663)
Fixes#16630
This PR fixes the above issue which affects cross scala2/3 projects that
use a common macro library as per
https://docs.scala-lang.org/scala3/guides/migration/tutorial-macro-mixing.html
, e.g. scala-logging is blocked from fixing this issue
lightbend-labs/scala-logging#317
The fix makes the scala 2 macro check read the Erased flag from the
initial flags rather than completing the RHS first. This will work in
the case of scala 2 macros because the erased flag is explicitly added
rather than being in the source code. However it relies on using an
"UNSAFE" value.
is(Macro, butNot =Inline) &&flagsUNSAFE.is(Erased)// flag is set initially for macros - we check if it's a scala 2 macro before completing the type constructor so do not force the info to check the flag
1034
1034
// Consider the macros of StringContext as plain Scala 2 macros when
0 commit comments