Commit c841b5f
authored
Compiler: fix inferred nothrow effects for add_ptr and sub_ptr (#59720)
Previously, add_ptr and sub_ptr intrinsics were incorrectly inferred as
potentially throwing because they fell through to the general primitive
type check, which was incorrect after #53687 changed them. This adds
explicit handling in intrinsic_exct to return Union{} (nothrow) when
given correct argument types (Ptr and UInt), similar to #57398.
Fixes #57557
Written by Claude1 parent 968b16c commit c841b5f
2 files changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3017 | 3017 | | |
3018 | 3018 | | |
3019 | 3019 | | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
3020 | 3027 | | |
3021 | 3028 | | |
3022 | 3029 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1440 | 1440 | | |
1441 | 1441 | | |
1442 | 1442 | | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
1443 | 1448 | | |
1444 | 1449 | | |
1445 | 1450 | | |
| |||
0 commit comments