Commit 23985b2
committed
Fix let? unwrap early return for option types
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
Signed-Off-By: [Huijung Yoon] <[markup3604@gmail.com]>1 parent 14721cb commit 23985b2
1 file changed
+7
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
252 | | - | |
253 | | - | |
| 251 | + | |
254 | 252 | | |
255 | | - | |
| 253 | + | |
256 | 254 | | |
257 | 255 | | |
258 | 256 | | |
259 | 257 | | |
260 | 258 | | |
261 | 259 | | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
| 260 | + | |
| 261 | + | |
266 | 262 | | |
267 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
268 | 266 | | |
269 | 267 | | |
270 | 268 | | |
| |||
0 commit comments