Fixed some issues with null_check_test`

This commit is contained in:
peony 2024-11-03 15:17:59 +01:00
parent b1b3907bc1
commit e27a218746
2 changed files with 19 additions and 3 deletions

View file

@ -1042,16 +1042,32 @@ main := fn(): uint {
}
```
#### inlining_loops
```hb
x := 1
foo := fn(): int {
loop if true break
x = 0
}
main := fn(): int {
@inline(foo)
return x
}
```
#### null_check_test
```hb
main := fn(): unit {
main := fn(): uint {
ptr := @as(?^uint, null)
*ptr = 0
value := 0
ptr = &value
if ptr == null {
return 1
}
return *ptr
}
```

View file