✓
Passing This code compiles and runs correctly.
Code
// ============================================================================
// VERIFIED REGRESSION TEST - DO NOT MODIFY WITHOUT DISCUSSION
// ============================================================================
// Test 505: Tap shorthand syntax
// Tests that `~tap(event)` is equivalent to `~tap(event -> *)`
// The shorthand omits `-> *` when observing all branches.
~import std/io
~import std/taps
// Simple event with one branch we care about
~tor ping {} -> string
~proc ping|zig {
return "Pong!";
}
// SHORTHAND: ~tap(ping) instead of ~tap(ping -> *)
~tap(ping): v |> std/io:print.ln("Tap observed pong")
// Main flow
~ping(): p |> std/io:print.ln(p)
Actual
Tap observed pong
Pong!
Expected output
Tap observed pong
Pong!
Flows
flow ~tap click a branch to expand · @labels scroll to their anchor
tap (ping)
flow ~ping click a branch to expand · @labels scroll to their anchor
ping
Test Configuration
MUST_RUN