INFO sandbox.py:5:12-15: revealed type: (TypeVar[T]) -> TypeVar[T] [reveal-type]
ERROR sandbox.py:6:10-14: `TypeVar[T]` is not assignable to `int` [bad-assignment]
ERROR sandbox.py:6:12-13: Argument `Literal[1]` is not assignable to parameter with type `TypeVar[T]` [bad-argument-type]
Describe the Bug
Python: 3.12
The type of
fshould be[T](T) -> Tand not(TypeVar[T]) -> TypeVar[T]Because of this the usage of
ffails with type errors.Sandbox Link
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeS4ATrgLYAEALqcROgOZ0Q3G6UN0AqADroRAFToBeOmOYwAaqkoAKAORjVAShFhEdAMKooUVNlgBtc2IC6AGhnWpdEzWyZUdfHvwjKMAG4wRgD6TMQwymDa6JR6rPzSYMoAjJogtiAArgzQcCTkiCAAxHQAqjlQEEx0YJnoAMY5uOhwIiKYMGA1vDSoDMHoma4wKl6c6AyadAC0AHx0cAyxInSrdH4MmZToNUIgAHJD2CN6wPgAvnsi6SBkfmBQpIQMtFAUJQAKpPePCxg4BDo9WakDYWz6EGahBEJQAyjAYHQABYMBjEOCIAD0mLunUehF4bExMHQmMwuHqcExwPQoPBTVJ3UodFQ-lQ0FMsCBIIgYMoEOadFwxAZeREZAYSOa00ClDgkJ20j2AGZCMkAExXdAgc4ZVCNCCBABi0BgFDQWDwRDIOqAA
(Only applicable for extension issues) IDE Information
No response