120 instantiate basic

✓ Passing This code compiles and runs correctly.

Code

// TEST: Basic generic instantiation with ~type
//
// ~type(OptionalInt = Option<i32>) creates a concrete type
// by substituting i32 for T in Option<T>.
//
// Expected: Compiles and emits a concrete Zig struct

~import "$std/types"

const std = @import("std");

~struct(Option<T>) { value: ?T = null }
~type(OptionalInt = Option<i32>)

~event test_opt {}
| done {}

~proc test_opt {
    const opt = OptionalInt{ .value = 123 };
    if (opt.value) |v| {
        std.debug.print("Value: {d}\n", .{v});
    }
    return .{ .done = .{} };
}

~test_opt()
| done |> _
input.kz

Actual

Value: 123

Test Configuration

MUST_RUN

Expected Behavior:

CONTAINS Value: 123