✓
Passing This code compiles and runs correctly.
Code
// Test: ~struct as keyword (no module qualification)
//
// With [keyword] on types.kz, ~struct(Name) should work
// without writing ~std/types:struct(Name)
~import std/types
~import std/io
// Declare a struct using keyword syntax
~struct(Player) {
name: []const u8,
health: i32,
}
// Use it to prove it compiled
const player = Player{ .name = "Alice", .health = 100 };
~std/io:print.ln("Player: {{ player.name:s }}, Health: {{ player.health:d }}")
Actual
Player: Alice, Health: 100
Expected output
Player: Alice, Health: 100
Flows
flow ~struct click a branch to expand · @labels scroll to their anchor
struct (Player, source: name: []const u8,
health: i32,)
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "Player: {{ player.name:s }}, Health: {{ player.health:d }}")
Test Configuration
MUST_RUN