fixes #451
This commit is contained in:
parent
b487ebaaba
commit
2f5d5e3ba7
2 changed files with 15 additions and 1 deletions
12
tests/reject/tneedsdiscard.nim
Normal file
12
tests/reject/tneedsdiscard.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
discard """
|
||||
line: 10
|
||||
errormsg: "value returned by statement has to be discarded"
|
||||
"""
|
||||
|
||||
proc p =
|
||||
var f: TFile
|
||||
echo "hi"
|
||||
|
||||
open(f, "arg.txt")
|
||||
|
||||
p()
|
||||
Loading…
Add table
Add a link
Reference in a new issue