mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
Python: ObjectAPI to ValueAPI: ObjectAPI.qll: Fixes error in isIterator
This commit is contained in:
@@ -423,7 +423,7 @@ class ClassValue extends Value {
|
||||
* '__next__' method exists to define a class as an iterator.
|
||||
*/
|
||||
major_version() = 2 and this.hasAttribute("next") and
|
||||
exists(ClassObject other, FunctionObject iter |
|
||||
exists(ClassValue other, FunctionValue iter |
|
||||
other.declaredAttribute("__iter__") = iter |
|
||||
iter.getAnInferredReturnType() = this
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user