You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix let? unwrap to use actual variable names instead of hardcoded ones
When using `let? Some(myVar) = ...`, the variable name was hardcoded as "x"
instead of using the actual pattern variable name "myVar".
This fix extracts the variable name from the pattern and uses it in the
early return cases, ensuring proper variable propagation and avoiding
unnecessary runtime allocations.
Fixes#8085
Signed-Off-By: [Huijung Yoon] <[markup3604@gmail.com]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@
22
22
23
23
- Reanalyze: make optional args analysis liveness-aware, preventing false positives when functions are only called from dead code. https://github.com/rescript-lang/rescript/pull/8082
24
24
- Fix: do not warn for "editor" field in `rescript.json`. https://github.com/rescript-lang/rescript/pull/8084
25
+
- Fix `let?` unwrap to use actual variable names from pattern instead of hardcoded "x"/"e". When using `let? Some(myVar) = ...`, the variable name `myVar` is now properly propagated in early returns. https://github.com/rescript-lang/rescript/issues/8085
0 commit comments