✓
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 }}")
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 (expr: 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