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 c2a8dae commit 7a0b4b4Copy full SHA for 7a0b4b4
compiler/src/dotty/tools/repl/ParseResult.scala
@@ -108,8 +108,10 @@ object ParseResult {
108
109
@sharable private[this] val CommandExtract = """(:[\S]+)\s*(.*)""".r
110
111
+ @sharable private[this] var i = 0
112
private def parseStats(sourceCode: String)(implicit ctx: Context): List[untpd.Tree] = {
- val source = new SourceFile("<console>", sourceCode)
113
+ val source = new SourceFile(s"<console$i>", sourceCode)
114
+ i += 1
115
val ctx1 = ctx.fresh.setSource(source)
116
val parser = new Parser(source)(ctx1)
117
val stats = parser.blockStatSeq()
0 commit comments