Commit 1490a27
committed
[Sema] Fix an IsPattern optional unwrap logic error
The case being handled is the input being more
optional than the cast type, so we need to inject
optional patterns to bring the input down to the
same optionality of the cast. Therefore we need
to take the optional types from the start of the
input optional types, not the end.
Luckily this issue doesn't currently cause any
issues because `coercePatternToType` will fixup
the right type.1 parent ab0ffe3 commit 1490a27
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1388 | 1388 | | |
1389 | 1389 | | |
1390 | 1390 | | |
1391 | | - | |
| 1391 | + | |
1392 | 1392 | | |
1393 | 1393 | | |
1394 | 1394 | | |
| |||
0 commit comments