This commit is contained in:
agra
2026-03-04 17:12:56 +02:00
parent 67e02a20a5
commit 22bc2439ce
7 changed files with 217 additions and 18 deletions

View File

@@ -769,6 +769,12 @@ END;
ip3 := @out3.inner;
print("ptr-nested-field: {} {} {}\n", ip3.a, ip3.b, ip3.c);
// Store to many-pointer field must not corrupt adjacent memory
MpHolder :: struct { items: [*]s64; sentinel: s64; }
mph := MpHolder.{ items = xx 0, sentinel = 42 };
mph.items = xx 0;
print("mp-store-sentinel: {}\n", mph.sentinel);
// --- Vectors ---
vc := vec3(1, 3, 2);
print("vec-construct: {}\n", vc);
@@ -3165,6 +3171,10 @@ END;
print("wasm 64-bit??\n");
}
}
// POINTER_SIZE in regular (non-inline) if expression
ps := if POINTER_SIZE == 8 then "8" else "4";
print("pointer size via if: {}\n", ps);
}
// ── Trailing commas ──────────────────────────────────────────