✓
Passing This code compiles and runs correctly.
Code
// TEST: ~bool creates a nominal boolean type
//
// ~bool(IsActive) creates a distinct type that wraps bool
// Koru tracks it as a separate type for type checking purposes.
//
// Expected: Compiles and runs, IsActive is usable as a bool
~import std/types
const std = @import("std");
~bool(IsActive)
~event check-status { active: IsActive }
| active
| inactive
~proc check-status|zig {
if (active) {
std.debug.print("User is active\n", .{});
return .{ .active = .{} };
} else {
std.debug.print("User is inactive\n", .{});
return .{ .inactive = .{} };
}
}
~check-status(active: true)
| active |> _
| inactive |> _
Actual
User is active
Must contain:
User is activeFlows
flow ~bool click a branch to expand · @labels scroll to their anchor
bool (IsActive)
flow ~check-status click a branch to expand · @labels scroll to their anchor
check-status (active: true)
Test Configuration
MUST_RUN