Commit 49d9f4e
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 57501f3 commit 49d9f4e
2 files changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2978 | 2978 | | |
2979 | 2979 | | |
2980 | 2980 | | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
2981 | 2988 | | |
2982 | 2989 | | |
2983 | 2990 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1438 | 1438 | | |
1439 | 1439 | | |
1440 | 1440 | | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
1441 | 1446 | | |
1442 | 1447 | | |
1443 | 1448 | | |
| |||
0 commit comments