forked from AbleOS/holey-bytes
Fixed some issues with null_check_test
`
This commit is contained in:
parent
b1b3907bc1
commit
e27a218746
|
@ -1042,11 +1042,27 @@ 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
|
#### null_check_test
|
||||||
```hb
|
```hb
|
||||||
main := fn(): unit {
|
main := fn(): uint {
|
||||||
ptr := @as(?^uint, null)
|
ptr := @as(?^uint, null)
|
||||||
*ptr = 0
|
value := 0
|
||||||
|
ptr = &value
|
||||||
|
|
||||||
if ptr == null {
|
if ptr == null {
|
||||||
return 1
|
return 1
|
||||||
|
|
0
lang/tests/son_tests_null_check_test.txt
Normal file
0
lang/tests/son_tests_null_check_test.txt
Normal file
Loading…
Reference in a new issue