Skip to content

Commit e1a136a

Browse files
committed
don't try to complete scala 2 macro before the constructor (and its type params) have been completed
1 parent d788ef2 commit e1a136a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ object SymDenotations {
10301030

10311031
/** Is this a Scala 2 macro defined */
10321032
final def isScala2MacroInScala3(using Context): Boolean =
1033-
is(Macro, butNot = Inline) && is(Erased)
1033+
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
10341034
// Consider the macros of StringContext as plain Scala 2 macros when
10351035
// compiling the standard library with Dotty.
10361036
// This should be removed on Scala 3.x

0 commit comments

Comments
 (0)