Sema: add missing error and test for bool not on vector of ints

This commit is contained in:
Andrew Kelley
2025-06-12 16:03:32 -07:00
parent dcdb4422b8
commit dd75e7bcb1
3 changed files with 63 additions and 31 deletions

View File

@@ -10,4 +10,4 @@ export fn entry() usize {
// backend=stage2
// target=native
//
// :3:60: error: unable to perform binary not operation on type 'comptime_int'
// :3:61: error: bitwise not operation on type 'comptime_int'

View File

@@ -0,0 +1,10 @@
export fn foo() void {
var x: @Vector(2, u1) = .{ 0, 1 };
x = !x;
}
// error
// backend=stage2
// target=native
//
// :3:10: error: boolean not operation on type '@Vector(2, u1)'