Commit f84e76a
committed
fix(semantic): evaluate const
Const bitwise ops on bool operands (`ConstValue::Enum`) fell through to the
numeric path, where `NumericArg::try_new` rejects them, dropping the value to
`Missing` and surfacing later as a sierra-generation ICE. Handle bool operands
directly alongside the existing `eq`/`ne` cases: `not`, `bitand`, `bitor`,
`bitxor`. Integer operands still take the numeric path.!, &, |, ^ on bool operands1 parent daff9bc commit f84e76a
2 files changed
Lines changed: 21 additions & 2 deletions
File tree
- corelib/src/test/language_features
- crates/cairo-lang-semantic/src/items
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
162 | 172 | | |
163 | 173 | | |
164 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
922 | 922 | | |
923 | 923 | | |
924 | 924 | | |
925 | | - | |
926 | | - | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
927 | 936 | | |
928 | 937 | | |
929 | 938 | | |
| |||
0 commit comments