Skip to content

Commit e39a0c9

Browse files
committed
Python: Moves non_local_control_flow to new API, and fixes bug in ClassValue implementation
1 parent 85f5ad2 commit e39a0c9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

python/ql/src/Exceptions/EmptyExcept.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ predicate no_comment(ExceptStmt ex) {
3131
}
3232

3333
predicate non_local_control_flow(ExceptStmt ex) {
34-
ex.getType().refersTo(theStopIterationType())
34+
ex.getType().pointsTo(ClassValue::stopIteration())
3535
}
3636

3737
predicate try_has_normal_exit(Try try) {

python/ql/src/semmle/python/objects/ObjectAPI.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ module ClassValue {
839839

840840
/** Get the `ClassValue` for the `StopIteration` class. */
841841
ClassValue stopIteration() {
842-
result = TBuiltinClassObject(Builtin::special("StopIteration"))
842+
result = TBuiltinClassObject(Builtin::builtin("StopIteration"))
843843
}
844844

845845
/** Get the `ClassValue` for the class of modules. */

0 commit comments

Comments
 (0)