diff --git a/lang/README.md b/lang/README.md index 5c7d021..7aae452 100644 --- a/lang/README.md +++ b/lang/README.md @@ -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 } ``` diff --git a/lang/tests/son_tests_null_check_test.txt b/lang/tests/son_tests_null_check_test.txt new file mode 100644 index 0000000..e69de29