Python: ObjectAPI to ValueAPI: ObjectAPI.qll: Fixes error in isIterator

This commit is contained in:
Rebecca Valentine
2020-03-31 22:15:21 -07:00
parent 160f6cbc15
commit 0b2db56051

View File

@@ -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
)