harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 85f5b69c494039b0a10763aa2ae952e7153eb917
parent 28b1bf07c3bb293527d0df31f34074b2e025a417
Author: Drew DeVault <sir@cmpwn.com>
Date:   Wed,  1 Sep 2021 13:51:33 +0200

tests: test yield termination semantics

Diffstat:
Mtests/33-yield.ha | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/tests/33-yield.ha b/tests/33-yield.ha @@ -12,6 +12,15 @@ fn basics() void = { assert(y == 20); }; +fn termination() void = { + :outer { + if (true) { + yield :outer; + } else void; + abort(); + }; +}; + fn cast_lowering() void = { let x: (int | void) = { yield 10; @@ -21,5 +30,6 @@ fn cast_lowering() void = { export fn main() void = { basics(); + termination(); cast_lowering(); };