Skip to content

Commit 0ca7713

Browse files
committed
Allow trees to get error types in IDE even if
no errors were reported.
1 parent f9fa640 commit 0ca7713

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ object Trees {
115115
*/
116116
def withType(tpe: Type)(implicit ctx: Context): ThisTree[Type] = {
117117
if (tpe.isInstanceOf[ErrorType])
118-
assert(ctx.reporter.errorsReported)
118+
assert(ctx.mode.is(Mode.Interactive) || ctx.reporter.errorsReported)
119119
else if (Config.checkTreesConsistent)
120120
checkChildrenTyped(productIterator)
121121
withTypeUnchecked(tpe)

0 commit comments

Comments
 (0)