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.
1 parent 8cce121 commit f8beb38Copy full SHA for f8beb38
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