009 universal wildcard metatype

✓ Passing This code compiles and runs correctly.

Code

const std = @import("std");
~import "$app/test_lib/logger"
~event compute { x: i32 }
| result i32
~event format { value: i32 }
| formatted []const u8
~proc compute {
    std.debug.print("compute({d})\n", .{x});
    return .{ .result = x * 2 };
}
~proc format {
    std.debug.print("format({d})\n", .{value});
    return .{ .formatted = "formatted" };
}
~compute(x: 42)
| result r |> format(value: r)
    | formatted |> _
input.kz

Expected

[TAP] Profile: koru:start.done
compute(42)
[TAP] Profile: input:compute.result
format(84)
[TAP] Profile: input:format.formatted
[TAP] Profile: koru:end.done

Actual

[TAP] Profile: koru:start.done
compute(42)
[TAP] Profile: input:compute.result
format(84)
[TAP] Profile: input:format.formatted
[TAP] Profile: koru:end.done

Imported Files

// Logger with universal wildcard + metatype tap

~import "$std/taps"
const std = @import("std");

~pub event log { source: []const u8, branch: []const u8 }

~proc log {
    std.debug.print("[TAP] Profile: {s}.{s}\n", .{source, branch});
}

// VALID: Universal wildcard (*:*) + metatype (Profile)
// Profile metatype works on ANY event and ANY branch
~tap(*:* -> *)
| Profile p |> log(source: p.source, branch: p.branch)
test_lib/logger.kz

Test Configuration

MUST_RUN