005 proto extends cycle refused

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

Code

input.k

Actual compiler output

error[KORU173]: std/proto(A): extension cycle detected: A <: B <: A — '<:' unions field sets; a cycle would expand forever
  --> tests/regression/600_STDLIB/698_OOP/698_005_proto_extends_cycle_refused/input.k:5:0

error[KORU173]: std/proto(B): '<:' names unknown proto 'A' — extension composes declared field sets; declare the parent first
  --> tests/regression/600_STDLIB/698_OOP/698_005_proto_extends_cycle_refused/input.k:9: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 (A <: B, source: x: i64)
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (B <: A, source: y: i64)

Test Configuration

MUST_ERROR