aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-01-20 14:09:46 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-01-20 14:09:46 -0500
commitaee973829d7b101d76e94d9aee15b1bef33094c0 (patch)
tree9ce52349a3124d2229a3d125c801fdc39dcdf734 /test/compile_errors.zig
parentc968d8756c9158433a9fb30db1f4989d1148cc7f (diff)
parent1357bc7430e48137b249c6930b4f03c48efa0f33 (diff)
downloadzig-aee973829d7b101d76e94d9aee15b1bef33094c0.tar.gz
zig-aee973829d7b101d76e94d9aee15b1bef33094c0.zip
Merge branch 'kristate-zig-backport-issue1883'
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 880a96a322..d9603ba4ff 100644
--- a/test/compile_errors.zig
+++ b/test/compile_errors.zig
@@ -2,6 +2,15 @@ const tests = @import("tests.zig");
pub fn addCases(cases: *tests.CompileErrorContext) void {
cases.add(
+ "compile log a pointer to an opaque value",
+ \\export fn entry() void {
+ \\ @compileLog(@ptrCast(*const c_void, &entry));
+ \\}
+ ,
+ ".tmp_source.zig:2:5: error: found compile log statement",
+ );
+
+ cases.add(
"duplicate boolean switch value",
\\comptime {
\\ const x = switch (true) {