E8002
E8002 — Comptime assert failed
What the compiler reports
E8002{{.*}}Comptime assertion failed
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
//
// A `comptime` assert over a placement query is decided by the checker: this one is false,
// so the compile fails rather than a run-time check ever running.
fn main() -> i32 {
let g = spawn on(Topology::GPU) {
1
};
comptime {
assert(g.topology() == Some(Topology::CPU));
}
return 0;
}
From tests/frontend/fail/comptime_placement_assert_fails.vx, which asserts this diagnostic on every commit.