-
Notifications
You must be signed in to change notification settings - Fork 278
Labels
scoping-control-flowissues related to scoping and control flowissues related to scoping and control flowstaletypechecking
Milestone
Description
Describe the Bug
See sandbox
from typing import assert_never
class A:...
class B:...
def go(mdl:A|B):
match mdl:
case A():
print('A')
case B():
print('B')
case _:
assert_never(mdl)assert_never raises an issue which it shouldn't be raising?:
Argument A | Bis not assignable to parameterargwith typeNeverin functiontyping.assert_never`
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response
Reactions are currently unavailable
Sub-issues
Metadata
Metadata
Assignees
Labels
scoping-control-flowissues related to scoping and control flowissues related to scoping and control flowstaletypechecking