Nim/tests/reject/texprstmt.nim
2013-08-30 22:47:14 +02:00

12 lines
171 B
Nim

discard """
line: 10
errormsg: "value returned by statement has to be discarded"
"""
# bug #578
proc test: string =
result = "blah"
result[1 .. -1]
echo test()