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

# bug #578

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

echo test()
s='footer'>generated by cgit-pink 1.4.1-2-gfad0 (git 2.36.2.497.gbbea4dcf42) at 2025-07-07 09:31:39 +0000