?
Unknown Status unknown.
Code
// TEST: Instantiate generic with another instantiated generic as parameter
//
// Uses an already-instantiated type as a type argument.
//
// Expected: Compiles with nested instantiation
~import "$std/types"
const std = @import("std");
~struct(Box<T>) { value: T }
~struct(Wrapper<T>) { inner: T }
~type(IntBox = Box<i32>)
~type(WrappedIntBox = Wrapper<IntBox>)
~event test_nested {}
~proc test_nested|zig {
const inner = IntBox{ .value = 77 };
const wrapped = WrappedIntBox{ .inner = inner };
std.debug.print("Nested value: {d}\n", .{wrapped.inner.value});
}
~test_nested()
Actual
Nested value: 77
Must contain:
Nested value: 77Test Configuration
MUST_RUN