Files
sx/examples/expected/0027-basic-control-flow.stdout
agra e12f817e52 test: split 50-smoke.sx into per-section examples + add errors smoke
Break the monolithic examples/50-smoke.sx into 30 focused per-section examples,
filed into their category blocks (basic/types/comptime/memory/protocols/ffi),
each carrying only the top-level decls its section references (the protocols
section keeps the full preamble — its deps flow through UFCS method calls that
name-based extraction can't see). Outputs verified identical to the original
section blocks.

Add examples/1036-errors-failable-smoke.sx — an end-to-end error-handling example
(the E5.4 work): named + inferred error sets consumed via destructure, try (in
helpers), catch (bare-expr / match-body / diverging / no-binding), or
value-terminator, onfail+defer interleave, and error.X value + {} tag
interpolation.

Remove examples/50-smoke.sx. Suite: 324 passed, 0 failed.
2026-06-01 19:34:21 +03:00

27 lines
487 B
Plaintext

=== 4. Control Flow ===
ite: 1
ite-both: 10 20
if-block: yes
if-no-else: after
nested-if: deep
if-else-if: second
if-block-expr: 15
while: 5
while-false: skipped
while-break: 7
while-continue: 25
while-sum: 55
nested-while: 9
nested-break: 2 2
for: 10 20 30 40
for-print: 10 20 30 40
for-idx: 0 1 2 3
for-2arg: 10@0 20@1 30@2 40@3
for-break: 10 20
for-continue: 10 30 40
for-slice: 10 20 30
for-slice-idx: 0:10 1:20 2:30
for-nested: (0,0) (0,1) (1,0) (1,1)
for-break-idx: 2
multi: 1 2 3