@@ -3,6 +3,15 @@ const builtin = @import("builtin");
|
||||
const Target = @import("std").Target;
|
||||
|
||||
pub fn addCases(cases: *tests.CompileErrorContext) void {
|
||||
cases.addTest("",
|
||||
\\const A = B;
|
||||
\\test "Crash" {
|
||||
\\ _ = @typeInfo(@This()).Struct.decls;
|
||||
\\}
|
||||
, &[_][]const u8{
|
||||
"tmp.zig:1:11: error: use of undeclared identifier 'B'",
|
||||
});
|
||||
|
||||
cases.addTest("duplicate field in anonymous struct literal",
|
||||
\\export fn entry() void {
|
||||
\\ const anon = .{
|
||||
|
||||
Reference in New Issue
Block a user