Closed
Description
Sometimes UnboundType
leaks to type checking, this is not good because it can lead to crashes like this:
File ".../mypy/subtypes.py", line 814, in <listcomp>
if (not (is_proper_subtype(erase_type(item), erased_s) or
File ".../mypy/erasetype.py", line 25, in erase_type
return typ.accept(EraseTypeVisitor())
File ".../mypy/types.py", line 194, in accept
return visitor.visit_unbound_type(self)
File ".../mypy/erasetype.py", line 31, in visit_unbound_type
assert False, 'Not supported'
AssertionError: Not supported
It would be better to replace all UnboundType
s with Any
(after an error is reported).