Exclude error types from contradictory-type-check query

This commit is contained in:
Chris Smowton
2024-02-29 12:32:40 +00:00
parent 140c3189e3
commit 903e4f59f0

View File

@@ -40,7 +40,9 @@ predicate contradictoryTypeCheck(Expr e, Variable v, RefType t, RefType sup, Exp
requiresInstanceOf(e, ssa.getAUse(), t) and
sup = t.getAnAncestor() and
instanceOfCheck(cond, ssa.getAUse(), sup) and
cond.(Guard).controls(e.getBasicBlock(), false)
cond.(Guard).controls(e.getBasicBlock(), false) and
not t instanceof ErrorType and
not sup instanceof ErrorType
)
}