Make Expr.getType() robust against incomplete type_of table.

This commit is contained in:
Max Schaefer
2019-12-05 17:05:02 +00:00
parent 8bd45593e0
commit 8364ba3d38

View File

@@ -102,7 +102,12 @@ class Expr extends @expr, ExprParent {
predicate isPlatformIndependentConstant() { none() }
/** Gets the type of this expression. */
Type getType() { type_of(this, result) }
Type getType() {
type_of(this, result)
or
not type_of(this, _) and
result instanceof InvalidType
}
/**
* Gets the global value number of this expression.