@@ -2,6 +2,15 @@ const tests = @import("tests.zig");
|
||||
const builtin = @import("builtin");
|
||||
|
||||
pub fn addCases(cases: *tests.CompileErrorContext) void {
|
||||
cases.add(
|
||||
"@hasDecl with non-container",
|
||||
\\export fn entry() void {
|
||||
\\ _ = @hasDecl(i32, "hi");
|
||||
\\}
|
||||
,
|
||||
"tmp.zig:2:18: error: expected struct, enum, or union; found 'i32'",
|
||||
);
|
||||
|
||||
cases.add(
|
||||
"field access of slices",
|
||||
\\export fn entry() void {
|
||||
|
||||
Reference in New Issue
Block a user