128 call in if condition

✓ Passing Passing: the compiler rejects this program as expected.

Code

input.k

Actual compiler output

error[KORU104]: nested call in argument 'expr' — calls are not expressions; use tor chaining: bind the result first
  --> tests/regression/320_CONTROL_FLOW/320_128_call_in_if_condition/input.k:16:0
    |
 16 | pick = if(g(a: 4) > 3)
    | ^
  hint: rewrite as `tor(args): x |> ...` and use `x` here

Frontend must reject with:

CONTAINS error[KORU104
CONTAINS nested call
CONTAINS chain

Flows

subflow ~pick click a branch to expand · @labels scroll to their anchor
if (g(a: 4) > 3)
flow ~pick click a branch to expand · @labels scroll to their anchor
pick

Test Configuration

MUST_ERROR