diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 710bab8924..dcc0b1c6ac 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -4852,10 +4852,9 @@ trait Typers extends Modes with Adaptations { // have to report missing errors (if any) def computeType(tree: Tree, pt: Type): Type = { val tree1 = typed(tree, pt) - if (tree1.containsError()) { - assert(errorTreesFinder(tree1).isEmpty, "All type errors have been reported during computation of type") + if (tree1.containsError()) ErrorType - } else { + else { transformed(tree) = tree1 val (tpe, errs) = packedType(tree1, context.owner) try { @@ -4863,7 +4862,6 @@ trait Typers extends Modes with Adaptations { tpe } catch { case _: TypeError => - assert(false, "No type errors can be thrown after type was computed") ErrorType } } |