E6007

E6007 — A Memory sub-space's capacity exceeds its parent's capacity (a child cannot be larger than what contains it).

What the compiler reports

E6007

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 sub-space cannot be larger than the space that contains it (E6007).
//

Memory SmemBlk {
  capacity: 228 KiB
}
Memory TooBig {
  within: Memory::SmemBlk, capacity: 512 KiB
}

fn main() -> i32 {
  return 0;
}

From tests/frontend/fail/memory_capacity_exceeds_parent.vx, which asserts this diagnostic on every commit.

Related