Commit df90bcb
committed
fix bug with type checking case/cond branches
This commit fixes a type checking problem where the type checker
was too aggresive in checking all branches of conditional expressions.
Instead, we require that just one branch is clean. If all the
branches have errors, then we report the errors and the query
fails to compile.
We will later at a strict-mode of type checking that requires
type assertions when needed and all the branches must pass
similar to the relational model.
Fixes #65631 parent 6f4f1a6 commit df90bcb
File tree
3 files changed
+87
-1
lines changed- compiler/semantic
- ztests
3 files changed
+87
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
| 85 | + | |
79 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
80 | 90 | | |
81 | 91 | | |
82 | 92 | | |
83 | 93 | | |
84 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
85 | 99 | | |
86 | 100 | | |
87 | 101 | | |
| |||
664 | 678 | | |
665 | 679 | | |
666 | 680 | | |
| 681 | + | |
667 | 682 | | |
668 | 683 | | |
669 | 684 | | |
| |||
672 | 687 | | |
673 | 688 | | |
674 | 689 | | |
| 690 | + | |
675 | 691 | | |
676 | 692 | | |
677 | 693 | | |
678 | 694 | | |
679 | 695 | | |
680 | 696 | | |
681 | 697 | | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
682 | 701 | | |
683 | 702 | | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
684 | 711 | | |
685 | 712 | | |
686 | 713 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments