aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-02-18 18:15:11 -0500
committerGitHub <noreply@github.com>2020-02-18 18:15:11 -0500
commitccca4b5a5e98dd96aaeb365af6c1cfbe87dca181 (patch)
tree9fef52c01f3f77fe25896196cc6c6b03cd5be832 /test/compile_errors.zig
parent7f92d0d4a44258a661a5dabf9800210f5ee31484 (diff)
parent6b74fd2e12b117e90197db5f4fa1ea51aa246248 (diff)
downloadzig-ccca4b5a5e98dd96aaeb365af6c1cfbe87dca181.tar.gz
zig-ccca4b5a5e98dd96aaeb365af6c1cfbe87dca181.zip
Merge pull request #4474 from LemonBoy/saukerkraut
Patches
Diffstat (limited to 'test/compile_errors.zig')
-rw-r--r--test/compile_errors.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig
index 240980efba..2c52ee2c67 100644
--- a/test/compile_errors.zig
+++ b/test/compile_errors.zig
@@ -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 = .{