harec

[hare] Hare compiler, written in C11 for POSIX OSs
Log | Files | Refs | README | LICENSE

commit a47c30aa492d3a58a6bb7635f89d98339012895f
parent c59e30f90590b39f47e9376d17c97b5fad3d6f59
Author: Bor Grošelj Simić <bgs@turminal.net>
Date:   Sun,  5 Feb 2023 05:37:20 +0100

tests: remove type annotation where it can be inferred

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>

Diffstat:
Mtests/06-structs.ha | 18++----------------
1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/tests/06-structs.ha b/tests/06-structs.ha @@ -190,13 +190,7 @@ fn invariants() void = { fn fields() void = { let n: u32 = 0; - let up: *union { - struct { - a: u8, - b: u8, - }, - c: u32, - } = &n: uintptr: *union { + let up = &n: *union { struct { a: u8, b: u8, @@ -207,15 +201,7 @@ fn fields() void = { assert(&up.b: uintptr == &n: uintptr + 1); assert(&up.c: uintptr == &n: uintptr); - let sp: *struct { - a: u8, - struct { - b: u8, - struct { - c: u8, - }, - }, - } = &n: uintptr: *struct { + let sp = &n: *struct { a: u8, struct { b: u8,