summary refs log tree commit diff stats
path: root/tests/controlflow/tblock1.nim
blob: 70c8445131aaf3c4fc136850eb007ecf10945cb8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
discard """
  errormsg: "undeclared identifier: \'ha\'"
  file: "tblock1.nim"
  line: 14
"""
# check for forward label and
# for failure when label is not declared

proc main =
  block endLess:
    write(stdout, "Muaahh!\N")
    break endLess

  break ha #ERROR

main()