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 baade1c commit 8afd9b3Copy full SHA for 8afd9b3
compiler/src/dotty/tools/dotc/ast/Trees.scala
@@ -112,9 +112,9 @@ object Trees {
112
* type. (Overridden by empty trees)
113
*/
114
def withType(tpe: Type)(implicit ctx: Context): ThisTree[Type] = {
115
- if (Config.checkUnreportedErrors)
116
- if (tpe.isInstanceOf[ErrorType]) assert(ctx.reporter.errorsReported)
117
- if (Config.checkTreesConsistent)
+ if (tpe.isInstanceOf[ErrorType])
+ assert(!Config.checkUnreportedErrors || ctx.reporter.errorsReported)
+ else if (Config.checkTreesConsistent)
118
checkChildrenTyped(productIterator)
119
withTypeUnchecked(tpe)
120
}
0 commit comments