-
Notifications
You must be signed in to change notification settings - Fork 238
Description
Describe the Bug
This is basically the same error as #1720, but for unary operators:
inversion sandbox
from typing import Self
class Foo:
def __invert__(self) -> Self:
return self
def test[F: Foo](foo: F) -> F:
return ~foo # ❌️ Unary `~` is not supported on `F`unary minus sandbox
from typing import Self
class Foo:
def __neg__(self) -> Self:
return self
def test[F: Foo](foo: F) -> F:
return -foo # ❌️ Unary `-` is not supported on `F`unary plus sandbox
from typing import Self
class Foo:
def __pos__(self) -> Self:
return self
def test[F: Foo](foo: F) -> F:
return +foo # ❌️ Unary `+` is not supported on `F`Sandbox Link
(Only applicable for extension issues) IDE Information
No response
Metadata
Metadata
Assignees
Labels
No labels