Member predicate Guard::appliesTypeTest
Holds if this guard tests whether testedExpr
has type testedType
.
restricted
is true if the test applies additional restrictions on top of just testedType
, and so
this guard failing does not guarantee testedExpr
is not a testedType
– for example,
matching record R(Object o)
with case R(String s)
is a guard with an additional restriction on the
type of field o
, so the guard passing guarantees testedExpr
is an R
, but it failing does not
guarantee testedExpr
is not an R
.
predicate appliesTypeTest(Expr testedExpr, Type testedType, boolean restricted)