Open randolf-scholz opened 7 months ago
Some of the traceback (from mypy-play):
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/mypy/checker.py", line 5107, in visit_match_stmt
pattern_types = [self.pattern_checker.accept(p, subject_type) for p in s.patterns]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/mypy/checkpattern.py", line 129, in accept
result = o.accept(self)
^^^^^^^^^^^^^^
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/mypy/patterns.py", line 93, in accept
return visitor.visit_sequence_pattern(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/mypy/checkpattern.py", line 335, in visit_sequence_pattern
new_type = self.construct_sequence_child(current_type, new_inner_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/mypy/checkpattern.py", line 756, in construct_sequence_child
assert isinstance(proper_type, Instance)
AssertionError
Looks like a missed case in the match implementation.
Bug Report
The following causes an
INTERNAL ERROR
. The issue seems to be related to the usage of match-case. https://mypy-play.net/?mypy=master&python=3.12&flags=show-traceback&gist=7ccec270743b3e26d66d211839e82e64To Reproduce
Actual Behavior
Full Traceback
``` Traceback (most recent call last): File "Your Environment
https://mypy-play.net/?mypy=master&python=3.12&flags=show-traceback&gist=7ccec270743b3e26d66d211839e82e64