Skip to content

Conversation

@Keno
Copy link
Member

@Keno Keno commented Feb 2, 2026

The function was checking rt.thentype twice instead of checking both rt.thentype and rt.elsetype. This caused incorrect type narrowing when conditional types were propagated through wrapper functions.

Fixes #60883. Completely done by Claude.

The function was checking `rt.thentype` twice instead of checking both
`rt.thentype` and `rt.elsetype`. This caused incorrect type narrowing
when conditional types were propagated through wrapper functions.

Fixes #60883

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@Keno Keno added bugfix This change fixes an existing bug compiler:inference Type inference backport 1.12 Change should be backported to release-1.12 backport 1.13 Change should be backported to release-1.13 labels Feb 2, 2026
@Keno Keno merged commit 922aa53 into master Feb 2, 2026
13 checks passed
@Keno Keno deleted the kf/60883 branch February 2, 2026 12:32
@KristofferC KristofferC mentioned this pull request Feb 4, 2026
21 tasks
KristofferC pushed a commit that referenced this pull request Feb 4, 2026
The function was checking `rt.thentype` twice instead of checking both
`rt.thentype` and `rt.elsetype`. This caused incorrect type narrowing
when conditional types were propagated through wrapper functions.

Fixes #60883. Completely done by Claude.

Co-authored-by: Keno Fischer <[email protected]>
Co-authored-by: Claude Opus 4.5 <[email protected]>
(cherry picked from commit 922aa53)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 1.12 Change should be backported to release-1.12 backport 1.13 Change should be backported to release-1.13 bugfix This change fixes an existing bug compiler:inference Type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apparent mutation within kwarg function

1 participant