Skip to content

Commit a3a9121

Browse files
committed
Harden TreeAccumulator for IDE
1 parent 1d05796 commit a3a9121

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/src/dotty/tools/dotc/ast/Trees.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1305,8 +1305,10 @@ object Trees {
13051305
this(this(x, arg), annot)
13061306
case Thicket(ts) =>
13071307
this(x, ts)
1308-
case _ if ctx.reporter.errorsReported =>
1308+
case _ if ctx.mode.is(Mode.Interactive) =>
13091309
// in case of errors it may be that typed trees point to untyped ones.
1310+
// The can still traverse inside such trees, either in the run where errors
1311+
// are reported, or in subsequent ones.
13101312
x
13111313
}
13121314
}

0 commit comments

Comments
 (0)