1414
1515import python
1616
17- predicate incorrect_except_order ( ExceptStmt ex1 , ClassObject cls1 , ExceptStmt ex2 , ClassObject cls2 ) {
17+ predicate incorrect_except_order ( ExceptStmt ex1 , ClassValue cls1 , ExceptStmt ex2 , ClassValue cls2 ) {
1818 exists ( int i , int j , Try t |
1919 ex1 = t .getHandler ( i ) and
2020 ex2 = t .getHandler ( j ) and i < j and
@@ -24,11 +24,11 @@ predicate incorrect_except_order(ExceptStmt ex1, ClassObject cls1, ExceptStmt ex
2424 )
2525}
2626
27- ClassObject except_class ( ExceptStmt ex ) {
28- ex .getType ( ) .refersTo ( result )
27+ ClassValue except_class ( ExceptStmt ex ) {
28+ ex .getType ( ) .pointsTo ( result )
2929}
3030
31- from ExceptStmt ex1 , ClassObject cls1 , ExceptStmt ex2 , ClassObject cls2
31+ from ExceptStmt ex1 , ClassValue cls1 , ExceptStmt ex2 , ClassValue cls2
3232where incorrect_except_order ( ex1 , cls1 , ex2 , cls2 )
3333select ex2 , "Except block for $@ is unreachable; the more general $@ for $@ will always be executed in preference." ,
3434 cls2 , cls2 .getName ( ) , ex1 , "except block" , cls1 , cls1 .getName ( )
0 commit comments