File tree 2 files changed +8
-2
lines changed
compiler/src/dotty/tools/dotc/core
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -486,6 +486,12 @@ object Symbols extends SymUtils {
486
486
mySource = ctx.getSource(file)
487
487
else
488
488
mySource = defn.patchSource(this )
489
+ if ! mySource.exists then
490
+ val compUnitInfo = compilationUnitInfo
491
+ if compUnitInfo != null then
492
+ compUnitInfo.tastyInfo.flatMap(_.attributes.sourceFile) match
493
+ case Some (path) => mySource = ctx.getSource(path)
494
+ case _ =>
489
495
if ! mySource.exists then
490
496
mySource = atPhaseNoLater(flattenPhase) {
491
497
denot.topLevelClass.unforcedAnnotation(defn.SourceFileAnnot ) match
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ class Attributes(
12
12
booleanTags.contains(TastyFormat .SCALA2STANDARDLIBRARYattr )
13
13
def explicitNulls : Boolean =
14
14
booleanTags.contains(TastyFormat .EXPLICITNULLSattr )
15
- def sourceFile : String =
16
- stringTagValues(TastyFormat .SOURCEFILEattr )
15
+ def sourceFile : Option [ String ] =
16
+ stringTagValues.get (TastyFormat .SOURCEFILEattr )
17
17
}
18
18
19
19
object Attributes :
You can’t perform that action at this time.
0 commit comments