You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This results in a hang, when type checked in --py2 mode (but only then):
# mypy: weak=global
ans = set()
ans = ans.union([])
for i in range(10):
ans = ans.union([])
Traceback:
Traceback (most recent call last):
File "/Users/jukka/src/mypy/scripts/mypy", line 184, in <module>
main()
File "/Users/jukka/src/mypy/scripts/mypy", line 36, in main
type_check_only(path, module, bin_dir, options)
File "/Users/jukka/src/mypy/scripts/mypy", line 80, in type_check_only
python_path=options.python_path)
File "/Users/jukka/src/mypy/mypy/build.py", line 160, in build
result = manager.process(UnprocessedFile(info, program_text))
File "/Users/jukka/src/mypy/mypy/build.py", line 344, in process
next.process()
File "/Users/jukka/src/mypy/mypy/build.py", line 796, in process
self.type_checker().visit_file(self.tree, self.tree.path)
File "/Users/jukka/src/mypy/mypy/checker.py", line 359, in visit_file
self.accept(d)
File "/Users/jukka/src/mypy/mypy/checker.py", line 366, in accept
typ = node.accept(self)
File "/Users/jukka/src/mypy/mypy/nodes.py", line 585, in accept
return visitor.visit_for_stmt(self)
File "/Users/jukka/src/mypy/mypy/checker.py", line 1602, in visit_for_stmt
self.accept_in_frame(s.body, repeat_till_fixed=True)
File "/Users/jukka/src/mypy/mypy/checker.py", line 380, in accept_in_frame
changed, _ = self.binder.pop_frame(True, True)
File "/Users/jukka/src/mypy/mypy/checker.py", line 189, in pop_frame
changed = self.update_from_options(options)
File "/Users/jukka/src/mypy/mypy/checker.py", line 144, in update_from_options
type = join_simple(self.frames[0][key], type, other)
File "/Users/jukka/src/mypy/mypy/join.py", line 26, in join_simple
if is_subtype(s, t):
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 47, in is_subtype
return left.accept(SubtypeVisitor(right, type_parameter_checker))
File "/Users/jukka/src/mypy/mypy/types.py", line 178, in accept
return visitor.visit_instance(self)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 108, in visit_instance
zip(t.args, right.args, right.type.defn.type_vars))
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 107, in <genexpr>
for lefta, righta, tvar in
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 20, in check_type_parameter
return is_subtype(lefta, righta, check_type_parameter)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 47, in is_subtype
return left.accept(SubtypeVisitor(right, type_parameter_checker))
File "/Users/jukka/src/mypy/mypy/types.py", line 459, in accept
return visitor.visit_union_type(self)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 180, in visit_union_type
for item in left.items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 180, in <genexpr>
for item in left.items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 47, in is_subtype
return left.accept(SubtypeVisitor(right, type_parameter_checker))
File "/Users/jukka/src/mypy/mypy/types.py", line 459, in accept
return visitor.visit_union_type(self)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 180, in visit_union_type
for item in left.items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 180, in <genexpr>
for item in left.items)
...
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 45, in is_subtype
for item in cast(UnionType, right).items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 45, in <genexpr>
for item in cast(UnionType, right).items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 45, in is_subtype
for item in cast(UnionType, right).items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 45, in <genexpr>
for item in cast(UnionType, right).items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 45, in is_subtype
for item in cast(UnionType, right).items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 45, in <genexpr>
for item in cast(UnionType, right).items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 45, in is_subtype
for item in cast(UnionType, right).items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 45, in <genexpr>
for item in cast(UnionType, right).items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 45, in is_subtype
for item in cast(UnionType, right).items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 45, in <genexpr>
for item in cast(UnionType, right).items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 45, in is_subtype
for item in cast(UnionType, right).items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 45, in <genexpr>
for item in cast(UnionType, right).items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 45, in is_subtype
for item in cast(UnionType, right).items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 45, in <genexpr>
for item in cast(UnionType, right).items)
File "/Users/jukka/src/mypy/mypy/subtypes.py", line 40, in is_subtype
if (isinstance(right, AnyType) or isinstance(right, UnboundType)
File "/Users/jukka/venv/mypy/bin/../lib/python3.4/abc.py", line 182, in __instancecheck__
if subclass in cls._abc_cache:
File "/Users/jukka/venv/mypy/bin/../lib/python3.4/_weakrefset.py", line 72, in __contains__
wr = ref(item)
KeyboardInterrupt
The text was updated successfully, but these errors were encountered:
This results in a hang, when type checked in
--py2
mode (but only then):Traceback:
The text was updated successfully, but these errors were encountered: