| author | |
| committer | |
| log | 74285a4ed70848452f34623454d665daae7f9522 |
| tree | a81156e6778b2c58c873ac05eb5e226f5cf806d8 |
| parent | f20e449fd6ad63c58e76670f230783d0dd399b93 |
Closes #50991 files changed, 17 insertions(+), 0 deletions(-)
test/cases/compile_errors/struct_type_mismatch_in_arg.zig created+17| ... | ... | @@ -0,0 +1,17 @@ |
| 1 | const Foo = struct { i: i32 }; | |
| 2 | const Bar = struct { j: i32 }; | |
| 3 | ||
| 4 | pub fn helper(_: Foo, _: Bar) void { } | |
| 5 | ||
| 6 | comptime { | |
| 7 | helper(Bar { .j = 10 }, Bar { .j = 10 }); | |
| 8 | helper(Bar { .i = 10 }, Bar { .j = 10 }); | |
| 9 | } | |
| 10 | ||
| 11 | // error | |
| 12 | // backend=stage2 | |
| 13 | // target=native | |
| 14 | // | |
| 15 | // :7:16: error: expected type 'tmp.Foo', found 'tmp.Bar' | |
| 16 | // :1:13: note: struct declared here | |
| 17 | // :2:13: note: struct declared here |