✓
Passing Passing: the compiler rejects this program as expected.
Code
// std/rings — the element type must resolve: a declared proto or a
// scalar. A name that is neither refuses with the declaration recipe.
import std/rings
std/rings:new(q, capacity: 4) { value: Nope }
Actual compiler output
error[KORU161]: std/rings:new(q): 'Nope' names no proto and no scalar — declare it `std/proto(Nope) { ... }` or use a scalar
--> tests/regression/300_ADVANCED_FEATURES/320_STDLIB/320_108_rings_unknown_element/input.k:5:0Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (q, capacity: 4, source: value: Nope)
Test Configuration
MUST_ERROR