From 215c18ebc86b116827d3af19ca0779316e1a0e15 Mon Sep 17 00:00:00 2001 From: lemon Date: Mon, 8 Aug 2022 08:48:21 +0200 Subject: break & continue --- bootstrap/test2.cff | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bootstrap/test2.cff') diff --git a/bootstrap/test2.cff b/bootstrap/test2.cff index b94a74e..fdb30cb 100644 --- a/bootstrap/test2.cff +++ b/bootstrap/test2.cff @@ -46,6 +46,16 @@ extern fn main() void { *f += 1.0f; } + #:outer for let i = 0; i++ < 10; { + printf("%d\n", i); + while #t { + if i < 2 { + continue #:outer; + } + break #:outer; + } + } + let x = Option:Some 3; let x = Option:None; -- cgit v1.2.3