summary refs log tree commit diff stats
path: root/tests/exprs/texprstmt.nim
blob: 79323d82a7ad879b1fae043ec58632e2f32ed58e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
discard """
  line: 10
  errormsg: "value of type 'string' has to be discarded"
"""

# bug #578

proc test: string =
  result = "blah"
  result[1 .. ^1]

echo test()