-
Notifications
You must be signed in to change notification settings - Fork 281
Closed
Labels
Description
Describe the Bug
The following example type checks in pyright, but not pyrefly:
from typing import Self
class Base:
@classmethod
def create(cls):
return cls()
@classmethod
def create_self(cls) -> Self:
return cls()
class Child(Base): pass
child1: Child = Child.create() # `Base` is not assignable to `Child` [bad-assignment]
child2: Child = Child.create_self() # okSandbox Link
(Only applicable for extension issues) IDE Information
No response
Reactions are currently unavailable