We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8cce121 + f8beb38 commit 7008144Copy full SHA for 7008144
compiler/src/dotty/tools/repl/ParseResult.scala
@@ -156,11 +156,13 @@ object ParseResult {
156
case CommandExtract(_) | "" => false
157
case _ => {
158
val reporter = newStoreReporter
159
+ val source = SourceFile.virtual("<incomplete-handler>", sourceCode)
160
+ val localCtx = ctx.fresh.setSource(source).setReporter(reporter)
161
var needsMore = false
162
reporter.withIncompleteHandler((_, _) => needsMore = true) {
- parseStats(sourceCode)(ctx.fresh.setReporter(reporter))
- !reporter.hasErrors && needsMore
163
+ parseStats(sourceCode)(localCtx)
164
}
165
+ !reporter.hasErrors && needsMore
166
167
168
0 commit comments