Commit fb5136e
jfecher
fix: bit shifting type checking (#5824)
# Description
## Problem\*
Resolves #5823
## Summary\*
We check `rhs` differently than `lhs` in left and right bit shifts in a
series of hacky checks.
In the case of type variables, `lhs` and `rhs` may be swapped causing
the unification to be placed on lhs instead of rhs. I've reordered the
cases to prevent this.
## Additional Context
## Documentation\*
Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.
# PR Checklist\*
- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.1 parent 806af24 commit fb5136e
3 files changed
Lines changed: 15 additions & 3 deletions
File tree
- compiler/noirc_frontend/src/elaborator
- test_programs/compile_success_empty/regression_5823
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1041 | 1041 | | |
1042 | 1042 | | |
1043 | 1043 | | |
1044 | | - | |
1045 | | - | |
1046 | | - | |
1047 | 1044 | | |
1048 | 1045 | | |
1049 | 1046 | | |
| |||
1058 | 1055 | | |
1059 | 1056 | | |
1060 | 1057 | | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
1061 | 1061 | | |
1062 | 1062 | | |
1063 | 1063 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments