compiler update, bugs changed
This commit is contained in:
parent
d85000b033
commit
08601a9f6d
2
build
2
build
|
@ -3,7 +3,7 @@ set -u
|
|||
|
||||
SCRIPT_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)"
|
||||
readonly SCRIPT_DIR
|
||||
readonly HBC_COMMIT="4826e26f"
|
||||
readonly HBC_COMMIT="27811d2e"
|
||||
readonly HBC_BRANCH="memory-rework"
|
||||
readonly SRC_DIR="$SCRIPT_DIR/src"
|
||||
readonly TEST_DIR="$SRC_DIR/test"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
lily := @use("../../lily/lib.hb")
|
||||
|
||||
main := fn(): u8 {
|
||||
main := fn(): uint {
|
||||
allocator := lily.alloc.RawAllocator.new()
|
||||
defer allocator.deinit()
|
||||
b := allocator.alloc(u8, 100)
|
||||
|
@ -13,6 +13,9 @@ main := fn(): u8 {
|
|||
if c == null return 1
|
||||
d := allocator.realloc(u8, c.ptr, 100)
|
||||
if d == null return 1
|
||||
if d.ptr != c.ptr return 1
|
||||
return 0
|
||||
// ! d.ptr != c.ptr, but d.ptr ^ c.ptr == 0... nice.
|
||||
if d.ptr != c.ptr return @as(uint, @bitcast(d.ptr ^ c.ptr))
|
||||
// ! 5 specifically causes a compiler error
|
||||
// ! set this to 1 after it gets fixed to demonstrate bug above
|
||||
return 5
|
||||
}
|
Loading…
Reference in a new issue