compile error for @noInlineCall on an inline fn

closes #1133
This commit is contained in:
Andrew Kelley
2018-09-04 17:38:48 -04:00
parent cbb3f1d76c
commit 869167fc6d
2 changed files with 16 additions and 0 deletions

View File

@@ -1,6 +1,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 {