aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-09-04 17:38:48 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-09-04 17:38:48 -0400
commit869167fc6d1f672f2bb827404b0e704223edab41 (patch)
tree422b9f8ca23c123789a8e2a37fc68fcda74f3918 /test/compile_errors.zig
parentcbb3f1d76c6a89acdb04cb628c349eee69dfacf5 (diff)
downloadzig-869167fc6d1f672f2bb827404b0e704223edab41.tar.gz
zig-869167fc6d1f672f2bb827404b0e704223edab41.zip
compile error for @noInlineCall on an inline fn
closes #1133
Diffstat (limited to 'test/compile_errors.zig')
-rw-r--r--test/compile_errors.zig11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig
index 6930f346e2..62aa7d46f2 100644
--- a/test/compile_errors.zig
+++ b/test/compile_errors.zig
@@ -2,6 +2,17 @@ const tests = @import("tests.zig");
pub fn addCases(cases: *tests.CompileErrorContext) void {
cases.add(
+ "@noInlineCall on an inline function",
+ \\inline fn foo() void {}
+ \\
+ \\export fn entry() void {
+ \\ @noInlineCall(foo);
+ \\}
+ ,
+ ".tmp_source.zig:4:5: error: no-inline call of inline function",
+ );
+
+ cases.add(
"comptime continue inside runtime switch",
\\export fn entry() void {
\\ var p: i32 = undefined;