File tree 1 file changed +3
-2
lines changed
compiler/src/dotty/tools/dotc/fromtasty 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class ReadTastyTreesFromClasses extends FrontEnd {
33
33
}
34
34
35
35
def alreadyLoaded (): None .type = {
36
- ctx.warning(" sclass $className cannot be unpickled because it is already loaded" )
36
+ ctx.warning(s " sclass $className cannot be unpickled because it is already loaded " )
37
37
None
38
38
}
39
39
@@ -66,7 +66,8 @@ class ReadTastyTreesFromClasses extends FrontEnd {
66
66
clsd.infoOrCompleter match {
67
67
case info : ClassfileLoader =>
68
68
info.load(clsd) // sets cls.treeOrProvider and cls.moduleClass.treeProvider as a side-effect
69
- compilationUnit(clsd.classSymbol).orElse(compilationUnit(clsd.moduleClass))
69
+ def moduleClass = clsd.owner.info.member(className.moduleClassName).symbol
70
+ compilationUnit(clsd.classSymbol).orElse(compilationUnit(moduleClass))
70
71
case _ =>
71
72
alreadyLoaded()
72
73
}
You can’t perform that action at this time.
0 commit comments