@@ -16,7 +16,7 @@ predicate instanceofThisInCharPred(Class c, Type type) {
1616 type = instanceOf .getType ( ) .getResolvedType ( )
1717 ) and
1818 // no existing super-type corresponds to the instanceof type, that is benign.
19- not c .getASuperType ( ) .getResolvedType ( ) = type
19+ not c .getType ( ) .getASuperType + ( ) = type
2020}
2121
2222/** Gets an inline cast that cases `this` to `type` inside a class predicate for `c`. */
@@ -29,7 +29,7 @@ InlineCast getAThisCast(Class c, Type type) {
2929 )
3030}
3131
32- predicate usesFieldBasedInstanceof ( Class c , TypeExpr type , FieldDecl field , ComparisonFormula comp ) {
32+ predicate usesFieldBasedInstanceof ( Class c , Type type , FieldDecl field , ComparisonFormula comp ) {
3333 exists ( FieldAccess fieldAccess |
3434 c .getCharPred ( ) .getBody ( ) = comp or
3535 c .getCharPred ( ) .getBody ( ) .( Conjunction ) .getAnOperand ( ) = comp
@@ -39,8 +39,9 @@ predicate usesFieldBasedInstanceof(Class c, TypeExpr type, FieldDecl field, Comp
3939 comp .getAnOperand ( ) instanceof ThisAccess and
4040 comp .getAnOperand ( ) = fieldAccess and
4141 fieldAccess .getDeclaration ( ) = field and
42- field .getVarDecl ( ) .getTypeExpr ( ) = type
43- )
42+ field .getVarDecl ( ) .getType ( ) = type
43+ ) and
44+ not c .getType ( ) .getASuperType + ( ) = type
4445}
4546
4647FieldAccess getARangeFieldAccess ( Class c , FieldDecl field , string name ) {
0 commit comments