✓
Passing This code compiles and runs correctly.
Code
// MIRROR of 340_001_struct_basic: `std/types:struct` declaring a nominal struct
// inside an imported .kz module.
//
// First .kz mirror on the wall — the module is host-embedded, so the transform
// declares a type that host code in the SAME module then constructs. The
// declaration and its use stay together because the emitted type lives in that
// module's scope; what moves is which scope that is.
import app/lib
app/lib:run()
Actual
Player: Alice, Health: 100
Expected output
Player: Alice, Health: 100
Flows
flow ~run click a branch to expand · @labels scroll to their anchor
run
Imported Files
~import std/types
~import std/io
~std/types:struct(Player) {
name: []const u8,
health: i32,
}
const player = Player{ .name = "Alice", .health = 100 };
~pub tor run {}
~run = std/io:print.ln("Player: {{ player.name:s }}, Health: {{ player.health:d }}")
Test Configuration
MUST_RUN