Skip to content

Fix type eval if params are not in alphabetical order.#23

Merged
dnwpark merged 2 commits intomainfrom
param-order
Jan 9, 2026
Merged

Fix type eval if params are not in alphabetical order.#23
dnwpark merged 2 commits intomainfrom
param-order

Conversation

@dnwpark
Copy link
Contributor

@dnwpark dnwpark commented Jan 9, 2026

Fixes type X[B, A] = A

@dnwpark dnwpark requested a review from msullivan January 9, 2026 02:06
Comment on lines +301 to +302
# obj.__args__ matches the declared parameter order, but args are expected
# to be in alphabetical order.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, expected by what to be in alphabetical order? By co_freevars? Make that clear in the comment.

Though actually it's I guess not technically expected in alphabetical order. It's expected in the order co_freevars lists. Which probably happens to be alphabetical.
(I was confused for a minute because you were talking about alphabetical order but there wasn't any sort call)

@dnwpark dnwpark merged commit 85ffd4a into main Jan 9, 2026
1 check passed
@dnwpark dnwpark deleted the param-order branch January 9, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants