Skip to content

Conversation

@HuijungYoon
Copy link

When using let? Some(x) = None in a function returning option<T>, the early return was incorrectly returning a variable instead of None.

This fixes the issue by explicitly returning None/Some values instead of using pattern-matched variables, ensuring correct type propagation and JS interop compatibility.

Fixes #8085

When using `let? Some(x) = None` in a function returning `option<T>`,
the early return was incorrectly returning a variable instead of None.

This fixes the issue by explicitly returning None/Some values instead
of using pattern-matched variables, ensuring correct type propagation
and JS interop compatibility.

Fixes rescript-lang#8085

Signed-Off-By: [Huijung Yoon] <[[email protected]]>
@fhammerschmidt fhammerschmidt requested a review from zth December 14, 2025 13:31
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.

let? ignores variable name in generated javascript

1 participant