| ... | ... | @@ -2,6 +2,22 @@ const tests = @import("tests.zig"); |
| 2 | 2 | const builtin = @import("builtin"); |
| 3 | 3 | |
| 4 | 4 | pub fn addCases(cases: *tests.CompileErrorContext) void { |
| 5 | cases.add( |
| 6 | "wrong frame type used for async call", |
| 7 | \\export fn entry() void { |
| 8 | \\ var frame: @Frame(foo) = undefined; |
| 9 | \\ frame = async bar(); |
| 10 | \\} |
| 11 | \\fn foo() void { |
| 12 | \\ suspend; |
| 13 | \\} |
| 14 | \\fn bar() void { |
| 15 | \\ suspend; |
| 16 | \\} |
| 17 | , |
| 18 | "tmp.zig:3:5: error: expected type '*@Frame(bar)', found '*@Frame(foo)'", |
| 19 | ); |
| 20 | |
| 5 | 21 | cases.add( |
| 6 | 22 | "@Frame() of generic function", |
| 7 | 23 | \\export fn entry() void { |