E6006
E6006 — AMemorydeclaration'swithin:hierarchy forms a cycle (a space contains itself).
What the compiler reports
E6006
The fragments the test suite holds the compiler to. An ellipsis marks text the test does not constrain; the emitted message also carries a source location.
A program that triggers it
//
// Part of the Vx Project, under the Apache License v2.0 with LLVM Exceptions.
// See LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// A `within:` cycle in the memory hierarchy is incoherent and rejected (E6006).
//
Memory Ring0 {
within: Memory::Ring1
}
Memory Ring1 {
within: Memory::Ring0
}
fn main() -> i32 {
return 0;
}
From tests/frontend/fail/memory_within_cycle.vx, which asserts this diagnostic on every commit.
Related
Topologies and memoryThe chapter covering the rule this code enforces.
All diagnosticsEvery code the compiler can emit, grouped by stage.
E6005A user-defined topology declaration is incoherent: it cannot see its own default memory space (
default_space ∉ visibility). See the topology coherence check.
E6007A Memory sub-space's capacity exceeds its parent's capacity (a child cannot be larger than what contains it).