14
14
15
15
import python
16
16
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 ) {
18
18
exists ( int i , int j , Try t |
19
19
ex1 = t .getHandler ( i ) and
20
20
ex2 = t .getHandler ( j ) and i < j and
@@ -24,11 +24,11 @@ predicate incorrect_except_order(ExceptStmt ex1, ClassObject cls1, ExceptStmt ex
24
24
)
25
25
}
26
26
27
- ClassObject except_class ( ExceptStmt ex ) {
28
- ex .getType ( ) .refersTo ( result )
27
+ ClassValue except_class ( ExceptStmt ex ) {
28
+ ex .getType ( ) .pointsTo ( result )
29
29
}
30
30
31
- from ExceptStmt ex1 , ClassObject cls1 , ExceptStmt ex2 , ClassObject cls2
31
+ from ExceptStmt ex1 , ClassValue cls1 , ExceptStmt ex2 , ClassValue cls2
32
32
where incorrect_except_order ( ex1 , cls1 , ex2 , cls2 )
33
33
select ex2 , "Except block for $@ is unreachable; the more general $@ for $@ will always be executed in preference." ,
34
34
cls2 , cls2 .getName ( ) , ex1 , "except block" , cls1 , cls1 .getName ( )
0 commit comments