Commit c549a29
committed
Elide same-type field-aware casts in CastExpr
Restore no-op cast canonicalization in
cast_with_target_field_and_options(...). Update
CastExpr::nullable() to align with runtime nullability,
while maintaining logical target field semantics via
return_field(). Adjust tests to ensure type-changing
casts preserve logical target field semantics,
and validate cast nullability against runtime semantics.1 parent 9aeb678 commit c549a29
2 files changed
Lines changed: 15 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
| 246 | + | |
254 | 247 | | |
255 | 248 | | |
256 | 249 | | |
| |||
338 | 331 | | |
339 | 332 | | |
340 | 333 | | |
341 | | - | |
342 | | - | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
343 | 339 | | |
344 | 340 | | |
345 | 341 | | |
| |||
954 | 950 | | |
955 | 951 | | |
956 | 952 | | |
957 | | - | |
958 | | - | |
| 953 | + | |
| 954 | + | |
959 | 955 | | |
960 | 956 | | |
961 | 957 | | |
962 | 958 | | |
963 | 959 | | |
964 | 960 | | |
965 | 961 | | |
966 | | - | |
| 962 | + | |
967 | 963 | | |
968 | 964 | | |
969 | 965 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
494 | | - | |
| 494 | + | |
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
539 | | - | |
| 539 | + | |
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
545 | | - | |
| 545 | + | |
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
572 | 564 | | |
573 | 565 | | |
574 | 566 | | |
| |||
0 commit comments