Skip to content

conformance: Do not mandate Literal promotion in generics#2206

Open
JelleZijlstra wants to merge 1 commit intopython:mainfrom
JelleZijlstra:literal-inference
Open

conformance: Do not mandate Literal promotion in generics#2206
JelleZijlstra wants to merge 1 commit intopython:mainfrom
JelleZijlstra:literal-inference

Conversation

@JelleZijlstra
Copy link
Member

The current test suite mandates that type checkers promote Literal types
(Literal[0]) to class types like int in inferring type arguments for
generics. I don't think the spec requires that.

The current test suite mandates that type checkers promote Literal types
(Literal[0]) to class types like int in inferring type arguments for
generics. I don't think the spec requires that.
@srittau srittau added the topic: conformance tests Issues with the conformance test suite label Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: conformance tests Issues with the conformance test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants