Skip to content

Commit b386fbd

Browse files
committed
Add missing source to context
1 parent 216a89a commit b386fbd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/repl/ParseResult.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ object ParseResult {
110110

111111
private def parseStats(sourceCode: String)(implicit ctx: Context): List[untpd.Tree] = {
112112
val source = new SourceFile("<console>", sourceCode)
113-
val parser = new Parser(source)
113+
val ctx1 = ctx.fresh.setSource(source)
114+
val parser = new Parser(source)(ctx1)
114115
val stats = parser.blockStatSeq()
115116
parser.accept(Tokens.EOF)
116117
stats

0 commit comments

Comments
 (0)