| 1 | fn foo(condition bool) int { |
| 2 | for _ in 0 .. 1 { |
| 3 | if condition { |
| 4 | continue // scope should not cause errors. |
| 5 | } |
| 6 | if !condition { |
| 7 | break |
| 8 | } |
| 9 | eprintln('done') |
| 10 | break |
| 11 | } |
| 12 | for _ in 0 .. 2 { |
| 13 | continue |
| 14 | // ... |
| 15 | eprintln('continue') |
| 16 | } |
| 17 | for _ in 0 .. 3 { |
| 18 | if condition { |
| 19 | break |
| 20 | // ... |
| 21 | eprintln('done') |
| 22 | } |
| 23 | break |
| 24 | // ... |
| 25 | return 3 |
| 26 | } |
| 27 | return if 1 == 1 { 1 } else { 2 } |
| 28 | a := 1 |
| 29 | println(a) |
| 30 | } |
| 31 | |
| 32 | fn main() { |
| 33 | foo(true) |
| 34 | } |
| 35 |