Skip to content

Commit 35c0804

Browse files
committed
sourcepath: don't create a new run for outline parsing
The previous commit broke compilation of the standard library, because we ended up calling `runContext` before the first context is set, when it's still `null`. But we don't really need a new run just for creating the symbol: the completer we set will call Run#lateCompile which will take care of creating a new run anyway.
1 parent 1b11e4b commit 35c0804

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ object SymbolLoaders {
156156
}
157157

158158
val unit = CompilationUnit(ctx.getSource(src.path))
159-
enterScanned(unit)(ctx.run.runContext.fresh.setCompilationUnit(unit))
159+
enterScanned(unit)(ctx.fresh.setCompilationUnit(unit))
160160

161161
/** The package objects of scala and scala.reflect should always
162162
* be loaded in binary if classfiles are available, even if sourcefiles

0 commit comments

Comments
 (0)