Skip to content

Commit 42b541a

Browse files
committed
Better workaround for #342. This one works also for symbols which are InSuperCall.
1 parent 235df32 commit 42b541a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/backend/jvm/DottyBackendInterface.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
427427
case TermRef(prefix: ThisType, name) =>
428428
Some(tpd.This(prefix.cls).select(i.symbol))
429429
case TermRef(NoPrefix, name) =>
430-
if (i.symbol is Flags.Method) Some(This(i.symbol.enclosingClass).select(i.symbol)) // workaround #342 todo: remove after fixed
430+
if (i.symbol is Flags.Method) Some(This(i.symbol.topLevelClass).select(i.symbol)) // workaround #342 todo: remove after fixed
431431
else None
432432
case _ => None
433433
}

0 commit comments

Comments
 (0)