File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,11 @@ class RestoreScopes extends MiniPhaseTransform with IdentityDenotTransformer { t
25
25
for (stat <- constr :: body)
26
26
if (stat.isInstanceOf [MemberDef ] && stat.symbol.exists)
27
27
restoredDecls.enter(stat.symbol)
28
- val cinfo = tree.symbol.asClass.classInfo
28
+ val cls = tree.symbol.asClass
29
+ cls.owner.asClass.enter(cls)
30
+ // Enter class in enclosing package scope, in case it was an inner class before flatten.
31
+ // For top-level classes this does nothing.
32
+ val cinfo = cls.classInfo
29
33
tree.symbol.copySymDenotation(
30
34
info = cinfo.derivedClassInfo( // Dotty deviation: Cannot expand cinfo inline without a type error
31
35
decls = restoredDecls : Scope )).installAfter(thisTransform)
You can’t perform that action at this time.
0 commit comments