001 struct basic

✓ Passing This code compiles and runs correctly.

Code

// Test: Basic struct declaration via types module

~import "$std/types"
~import "$std/io"

// Declare a struct type
~std.types:struct(Player) {
    name: []const u8,
    health: i32,
}

// Use the struct to prove it compiled
const player = Player{ .name = "Alice", .health = 100 };

~std.io:print.ln("Player: {{ player.name:s }}, Health: {{ player.health:d }}")
input.kz

Expected Output

Player: Alice, Health: 100

Test Configuration

MUST_RUN