Assigning to a comptime variable generates incorrect Hull (and fails in yule)
Open
- Dominant language
- Haskell
- Stars
- 113
- Forks
- 9
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 1
Description
Reproduction:
```
contract T {
function main() -> word {
let n : comptime word = 5;
n = 7;
return n;
}
}
```
generates the following in Hull
```
function main () -> word {
n := 7
return 7
```
which fails with
```
Type error:
Undefined variable: n
```
We should forbid mutation of comptime variables.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.