Files
Mikhail Golubevandintellij-monorepo-bot 1421975c96 PY-48012 Resolve and complete attributes in PEP 634 class patterns
Both are implemented other the type of the corresponding class.
References resolve to any readable attribute of a class, however
some obviously wrong variants such as special "dunder" attributes
and methods are intentionally excluded from completion suggestions.

GitOrigin-RevId: 5edac14f47cba39840b15b0dd7f21e2e46077261
2021-10-15 17:36:56 +00:00

9 lines
177 B
Python

class Class:
def __init__(self, foo):
self.foo = foo
match Class(1, 2):
case Class(<error descr="Unresolved reference 'baz'">baz</error>=42):
pass