Files
zig/test/cases/compile_errors/addition_with_non_numbers.zig
2022-06-30 21:47:26 +03:00

13 lines
268 B
Zig

const Foo = struct {
field: i32,
};
const x = Foo {.field = 1} + Foo {.field = 2};
export fn entry() usize { return @sizeOf(@TypeOf(x)); }
// error
// backend=llvm
// target=native
//
// :4:28: error: invalid operands to binary expression: 'Struct' and 'Struct'