add comptime test for the type of suspend promise

This commit is contained in:
Andrew Kelley 2018-03-24 19:31:00 -04:00
parent 897e783763
commit a43c7af3d1

View File

@ -56,6 +56,7 @@ var result = false;
async fn testSuspendBlock() void { async fn testSuspendBlock() void {
suspend |p| { suspend |p| {
comptime assert(@typeOf(p) == promise->void);
a_promise = p; a_promise = p;
} }
result = true; result = true;