Skip to content

Reject more covariant overrides #16455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hauntsaninja opened this issue Nov 11, 2023 · 1 comment
Closed

Reject more covariant overrides #16455

hauntsaninja opened this issue Nov 11, 2023 · 1 comment
Labels

Comments

@hauntsaninja
Copy link
Collaborator

Follow up to #3208. We should also reject things like:

from typing import TypeVar, Generic
T = TypeVar("T", covariant=True)
class Foo(Generic[T]):
    def __init__(self, value: T) -> None:
        self.foo = value
@ilevkivskyi
Copy link
Member

Is this a duplicate of #735? In particular #735 (comment)

@hauntsaninja hauntsaninja closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants