Closed DinoV closed 2 years ago
This code results in a compile time error:
class C: def f(self, a: int) -> int: pass class D(C): def f(self, a: int): pass
But this code does not:
class C: def f(self, a: int) -> int: pass class D(C): def f(self, a) -> int: pass
We should consistently require matching annotations.
Actually this is fine, we are allowing a to take a less specific type, and disallowing returning a less specific type.
a
This code results in a compile time error:
But this code does not:
We should consistently require matching annotations.