commit 1357bc7430e48137b249c6930b4f03c48efa0f33 (tree)
parent 0d1ce1fb5fb4bcfff0dc24b567220af6ec6b93ab
Author: Andrew Kelley <andrew@ziglang.org>
Date: Sun, 20 Jan 2019 14:09:17 -0500
add test case for previous commit
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git 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) {