mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
29 lines
343 B
Nim
29 lines
343 B
Nim
discard """
|
|
output: '''
|
|
A
|
|
B
|
|
C
|
|
D
|
|
'''
|
|
"""
|
|
# Test break in try statement:
|
|
|
|
proc main: int =
|
|
try:
|
|
block AB:
|
|
try:
|
|
try:
|
|
break AB
|
|
finally:
|
|
echo("A")
|
|
echo("skipped")
|
|
finally:
|
|
block B:
|
|
echo("B")
|
|
echo("skipped")
|
|
echo("C")
|
|
finally:
|
|
echo("D")
|
|
|
|
discard main()
|