Sema: tuples have no names to be used for reporting errors in finishStructInit
This commit is contained in:
committed by
GitHub
parent
bea958df4d
commit
61ba225709
@@ -13,9 +13,23 @@ export fn f() void {
|
||||
_ = a;
|
||||
}
|
||||
|
||||
const B = struct { u32, u32 };
|
||||
export fn g() void {
|
||||
const b = B{0};
|
||||
_ = b;
|
||||
}
|
||||
export fn h() void {
|
||||
const c = B{};
|
||||
_ = c;
|
||||
}
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :9:16: error: missing struct field: x
|
||||
// :1:11: note: struct 'tmp.A' declared here
|
||||
// :18:16: error: missing tuple field with index 1
|
||||
// :16:11: note: struct declared here
|
||||
// :22:16: error: missing tuple field with index 0
|
||||
// :22:16: note: missing tuple field with index 1
|
||||
// :16:11: note: struct 'tmp.B' declared here
|
||||
|
||||
Reference in New Issue
Block a user