From 46ddd5f5f4db7977010f78129fade7dfa5b9d8d3 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 8 Feb 2019 19:23:46 -0500 Subject: fix compiler assertion failure when returning value from test closes #1935 --- test/compile_errors.zig | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/compile_errors.zig') diff --git a/test/compile_errors.zig b/test/compile_errors.zig index acd1eada06..de01a5ac45 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -1,6 +1,13 @@ const tests = @import("tests.zig"); pub fn addCases(cases: *tests.CompileErrorContext) void { + cases.addTest( + "return invalid type from test", + \\test "example" { return 1; } + , + ".tmp_source.zig:1:25: error: integer value 1 cannot be implicitly casted to type 'void'", + ); + cases.add( "threadlocal qualifier on const", \\threadlocal const x: i32 = 1234; -- cgit v1.2.3