fixes #578
This commit is contained in:
parent
cf689f7472
commit
4d9b2f671a
4 changed files with 25 additions and 13 deletions
12
tests/reject/texprstmt.nim
Normal file
12
tests/reject/texprstmt.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
discard """
|
||||
line: 10
|
||||
errormsg: "value returned by statement has to be discarded"
|
||||
"""
|
||||
|
||||
# bug #578
|
||||
|
||||
proc test: string =
|
||||
result = "blah"
|
||||
result[1 .. -1]
|
||||
|
||||
echo test()
|
||||
Loading…
Add table
Add a link
Reference in a new issue