stage1: add missing error check on inferred struct field ptr
This commit is contained in:
@@ -2376,8 +2376,13 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
|
||||
\\export fn entry() void {
|
||||
\\ const x = [_]u8;
|
||||
\\}
|
||||
\\export fn entry2() void {
|
||||
\\ const S = struct { a: *const [_]u8 };
|
||||
\\ var a = .{ S{} };
|
||||
\\}
|
||||
, &[_][]const u8{
|
||||
"tmp.zig:2:15: error: inferred array size invalid here",
|
||||
"tmp.zig:5:34: error: inferred array size invalid here",
|
||||
});
|
||||
|
||||
cases.add("initializing array with struct syntax",
|
||||
|
||||
Reference in New Issue
Block a user