E2001

E2001 — Undefined variable

What the compiler reports

Error[E2001] at {{.*}}parallel_compile_ends_with_the_same_summary.vx:18:10: Undefined variable 'y'
Semantic check failed on '{{.*}}parallel_compile_ends_with_the_same_summary.vx': 1 error(s) emitted

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 compile with errors ends with the same line in a normal and a parallel (`-j`) compile,
// naming the file and how many errors it found.
//

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

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

Related