E3004
E3004 — Type mismatch in binary operation
What the compiler reports
Error[E3004] at {{.*}}binary_operation_type_error_points_at_the_operator.vx:15:13: Type mismatch in binary operation: i64 vs bool
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 type error in a binary operation is reported at the operator.
fn main() -> i32 {
let a = 1i64;
let b = true;
let c = a + b;
return 0;
}
From tests/frontend/fail/binary_operation_type_error_points_at_the_operator.vx, which asserts this diagnostic on every commit.