-
Notifications
You must be signed in to change notification settings - Fork 238
Open
Labels
needs-discussionAn issue where it's not clear whether there is a bug or we are behaving as expected.An issue where it's not clear whether there is a bug or we are behaving as expected.typechecking
Description
Describe the Bug
I expect no error with:
from typing import TypeVar
from mypy_extensions import FlexibleAlias
T = TypeVar("T")
Alias = FlexibleAlias[T, T]
def example(arg: Alias[int]) -> None:
pass
example(arg=1)mypy / pyright / ty give no error
With pyrefly I get:
Argument `Literal[1]` is not assignable to parameter `arg` with type `FlexibleAlias[int, int]` in function `example` [[bad-argument-type](https://pyrefly.org/en/docs/error-kinds/#bad-argument-type)]
Sandbox Link
(Only applicable for extension issues) IDE Information
No response
Metadata
Metadata
Assignees
Labels
needs-discussionAn issue where it's not clear whether there is a bug or we are behaving as expected.An issue where it's not clear whether there is a bug or we are behaving as expected.typechecking