✓
Passing This code compiles and runs correctly.
Code
// TEST: kernel.shape and kernel.init basic usage
//
// Minimal test - just verify the transform emits valid code
import std/kernel
import std/io
// Declare the shape
std/kernel:shape(Body) {
x: f64,
y: f64,
mass: f64,
}
// Initialize - generates Body struct and kernel_k variable
std/kernel:init(Body) {
x: 42.0,
y: 0,
mass: 1.5,
}
// Simple output to verify we got here
std/io:print.ln("kernel initialized")
Actual
kernel initialized
Expected output
kernel initialized
Flows
flow ~shape click a branch to expand · @labels scroll to their anchor
shape (expr: Body, source: x: f64,
y: f64,
mass: f64,)
flow ~init click a branch to expand · @labels scroll to their anchor
init (expr: Body, source: x: 42.0,
y: 0,
mass: 1.5,)
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "kernel initialized")
Test Configuration
MUST_RUN