✓
Passing Passing: the compiler rejects this program as expected.
Code
// PIN (enforcement): add demands <exact!>; a bare string literal
// holds no live obligation — phantom state mismatch.
import std/num
std/num:lit(1)
| exact a |> std/num:add(a, b: "3")
| bad _ |> _
Actual compiler output
error[KORU030]: Phantom state mismatch: '"3"' (parameter 'b') holds no live '<exact!>' obligation to consume here — it was never acquired or has already been discharged. Pass a value that still holds its '<exact!>' obligation.
--> tests/regression/600_STDLIB/615_NUM/615_011_reject_untainted_operand/input.k:6:1Backend must reject with:
CONTAINS error[KORU030]
CONTAINS Phantom state mismatchFlows
flow ~lit click a branch to expand · @labels scroll to their anchor
lit (expr: 1)
Test Configuration
MUST_ERROR