✓
Passing This code compiles and runs correctly.
Code
// Test 340_001: Type Declaration
//
// Validates that std/types:struct declarations parse correctly.
import std/types
import std/io
// Declare a simple struct
std/types:struct(Player) {
age: i32,
name: []const u8,
}
// Declare a public struct
[pub]std/types:struct(Position) {
x: f32,
y: f32,
}
// Prove compilation works
std/io:print.ln("Type declarations parsed successfully")
Actual
Type declarations parsed successfully
Expected output
Type declarations parsed successfully
Flows
flow ~struct click a branch to expand · @labels scroll to their anchor
struct (expr: Player, source: age: i32,
name: []const u8,)
flow ~struct click a branch to expand · @labels scroll to their anchor
struct (expr: Position, source: x: f32,
y: f32,)
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "Type declarations parsed successfully")
Test Configuration
MUST_RUN