✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: a subflow impl's name must be one a call site can spell. The
// parenthesised tail reads into the name — registering the impl under
// "sub(x)" while the event it means to implement is `sub` — so `sub`
// keeps no impl and the writer's intent evaporates silently.
const std = @import("std");
~tor sub { x: i64 } -> i64
~tor delegate { x: i64 } -> i64
~sub(x) = delegate(x)
Actual compiler output
error[PARSE003]: impl name 'sub(x)' is not one a call site can spell — each '.'-separated piece is an identifier (or '*' for a transform glob)
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_305_subflow_impl_name_with_call_tail_refused/input.kz:10:2
|
10 | ~sub(x) = delegate(x)
| ^Frontend must reject with:
CONTAINS error[PARSE003]
ERROR_AT 10
NOT_CONTAINS output_emitted.zigTest Configuration
MUST_ERROR