✓
Passing Passing: the compiler rejects this program as expected.
Code
// A compound graph must be acyclic: A reaches B reaches A, an infinite
// regress of scalars rather than a type. Refused at the declaration with
// the cycle named — the DAG law lives with the declaration, never with a
// consumer that might never walk it.
import std/proto
std/proto(A) {
b: B
}
std/proto(B) {
a: A
}
Actual compiler output
error[KORU173]: std/proto(A): compound cycle detected: A -> B -> A — a compound graph must be acyclic; expansion would never terminate
--> tests/regression/600_STDLIB/668_NESTED/668_004_cyclic_compound_refused/input.k:7:0
error[KORU173]: std/proto(B): field 'a' names unknown terminal 'A' — a field must use a scalar material, a terminal or compound of its own home, or a qualified name from another home
--> tests/regression/600_STDLIB/668_NESTED/668_004_cyclic_compound_refused/input.k:11:0Compiler 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, source: b: B)
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (B, source: a: A)
Test Configuration
MUST_ERROR