109 rings borrow element

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

Code

input.k

Actual compiler output

error[KORU161]: std/rings:new(q): a ring carries plain values — '*Reading' is a borrow, array, or phantom-typed element, and none of those have a slot shape this rung
  --> tests/regression/300_ADVANCED_FEATURES/320_STDLIB/320_109_rings_borrow_element/input.k:10:0

Compiler must reject:

Compilation must fail with a diagnostic.

Flows

flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Reading, source: id: u64)
flow ~new click a branch to expand · @labels scroll to their anchor
new (q, capacity: 4, source: value: *Reading)

Test Configuration

MUST_ERROR