mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
Merge pull request #196 from max/no-type
Make `Expr.getType()` robust against incomplete `type_of` table.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user