pyrefly icon indicating copy to clipboard operation
pyrefly copied to clipboard

Inconsistent override check doesn't work with generic functions

Open grievejia opened this issue 9 months ago • 1 comments

Minimal repro:

class Base:
    def filter[T](self, iterable: T) -> T:
        ...

class Derived(Base):
    def filter[T](self, iterable: T) -> T:
        ...

Expected: No error Actual: Class member Derived.filter overrides parent class Base in an inconsistent manner [bad-override]

grievejia avatar Apr 17 '25 02:04 grievejia

Might be a consequence of #73

grievejia avatar Apr 17 '25 02:04 grievejia

Update: we've fixed #73 but this bug persists.

It may still be related, for example the fix might not have handled something related to BoundMethod wrapping

stroxler avatar Aug 28 '25 16:08 stroxler