various tests #23

Merged
mlokis merged 3 commits from koniifer/holey-bytes:trunk into trunk 2024-11-07 01:49:57 -06:00
3 changed files with 16 additions and 0 deletions
Showing only changes of commit d3ee72306e - Show all commits

View file

@ -614,6 +614,18 @@ main := fn(): uint {
}
```
#### optional_from_eca
```hb
main := fn(): uint {
a := @as(?uint, @eca(0, 0, 0, 0))
if a == null {
die
}
return a
}
```
#### inlining_issues
```hb
main := fn(): void {

View file

@ -4594,5 +4594,6 @@ mod tests {
global_aliasing_overptimization;
overwrite_aliasing_overoptimization;
more_if_opts;
optional_from_eca;
}
}

View file

@ -0,0 +1,3 @@
test.hb:8:2: can't prove the value is not 'null', use '@unwrap(<opt>)' if you believe compiler is stupid, or explicitly check for null and handle it ('if <opt> == null { /* handle */ } else { /* use opt */ }')
return a
^