authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-03-24 19:31:00-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-03-24 19:31:00-04:00
loga43c7af3d1e41ccee73678f114bb3844febcaad6
tree5a1581139c05ad3b5aa0e9eb0d4a2a99c16203bb
parent897e783763d60449ad1b9514cb5ba86a38f7ae4a

add comptime test for the type of suspend promise


1 files changed, 1 insertions(+), 0 deletions(-)

test/cases/coroutines.zig+1
...@@ -56,6 +56,7 @@ var result = false;...@@ -56,6 +56,7 @@ var result = false;
5656
57async fn testSuspendBlock() void {57async fn testSuspendBlock() void {
58 suspend |p| {58 suspend |p| {
59 comptime assert(@typeOf(p) == promise->void);
59 a_promise = p;60 a_promise = p;
60 }61 }
61 result = true;62 result = true;