Skip to content

Conversation

@asukaminato0721
Copy link
Contributor

@asukaminato0721 asukaminato0721 commented Oct 26, 2025

fix #793

Added collect_var_from_hint/hint_from_types to gather element candidates across union branches and reused them in the container decomposers to keep contextual hints from collapsing to the first branch

Taught list inference to try each union branch with its own hint before falling back, plus factored the existing logic into a reusable helper

Unblocked the regression test by removing the expected errors and bug marker now that the behavior is fixed

@meta-cla meta-cla bot added the cla signed label Oct 26, 2025
@asukaminato0721 asukaminato0721 changed the title 793 fix Contextual typing works only with the first element in a union #793 Oct 26, 2025
@asukaminato0721 asukaminato0721 marked this pull request as ready for review October 28, 2025 05:33
@rchen152 rchen152 requested a review from samwgoldman October 30, 2025 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Contextual typing works only with the first element in a union

1 participant