@@ -40,7 +40,7 @@ InlineCast getAThisCast(Class c, Type type) {
4040 )
4141}
4242
43- predicate usesFieldBasedInstanceof ( Class c , TypeExpr type , VarDecl field , ComparisonFormula comp ) {
43+ predicate usesFieldBasedInstanceof ( Class c , TypeExpr type , FieldDecl field , ComparisonFormula comp ) {
4444 exists ( FieldAccess fieldAccess |
4545 c .getCharPred ( ) .getBody ( ) = comp or
4646 c .getCharPred ( ) .getBody ( ) .( Conjunction ) .getAnOperand ( ) = comp
@@ -50,7 +50,7 @@ predicate usesFieldBasedInstanceof(Class c, TypeExpr type, VarDecl field, Compar
5050 comp .getAnOperand ( ) instanceof ThisAccess and
5151 comp .getAnOperand ( ) = fieldAccess and
5252 fieldAccess .getDeclaration ( ) = field and
53- field .getTypeExpr ( ) = type
53+ field .getVarDecl ( ) . getTypeExpr ( ) = type
5454 ) and
5555 // require that there is a call to the range field that matches the name of the enclosing predicate
5656 exists ( FieldAccess access , MemberCall call |
@@ -60,7 +60,7 @@ predicate usesFieldBasedInstanceof(Class c, TypeExpr type, VarDecl field, Compar
6060 )
6161}
6262
63- FieldAccess getARangeFieldAccess ( Class c , VarDecl field , string name ) {
63+ FieldAccess getARangeFieldAccess ( Class c , FieldDecl field , string name ) {
6464 exists ( MemberCall call |
6565 result = call .getBase ( ) and
6666 result .getDeclaration ( ) = field and
0 commit comments