diff --git a/test/compile_errors.zig b/test/compile_errors.zig index 880a96a322b200ae3cc2e4de4a1c1b5db93af744..d9603ba4ff3a761d07aa0fc5d5e265dd95bef900 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -1,6 +1,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 {