Closed
Description
(based on #3111)
join
of Tuple
and namedtuple
:
class X(NamedTuple):
x: int
y: str
reveal_type([(3, 'b'), X(1, 'a')]) # E: Revealed type is 'builtins.list[Tuple[builtins.int, builtins.str]]'
reveal_type([X(1, 'a'), (3, 'b')]) # E: Revealed type is 'builtins.list[Tuple[builtins.int, builtins.str]]'
results in
File "c:\users\maxmo\downloads\mypy\mypy\join.py", line 293, in join_instances
args.append(join_types(t.args[i], s.args[i]))
IndexError: list index out of range