from typing import assert_never
class RQ: pass
class QQ: pass
class RA: pass
class QA: pass
def f(q: RQ | QQ, a: RA | QA):
match q, a:
case RQ(), RA(): return 1
case RQ(), _: return 2 # wildcard: covers the rest of the RQ row
case QQ(), QA(): return 3
case QQ(), _: return 4 # wildcard: covers the rest of the QQ row
case unreachable:
assert_never(unreachable)
Describe the Bug
ref zubanls/zuban#487
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response