add illegal discard test
This commit is contained in:
parent
b306e0bfe2
commit
fdd09ad090
1 changed files with 9 additions and 0 deletions
9
tests/discard/tillegaldiscard.nim
Normal file
9
tests/discard/tillegaldiscard.nim
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
discard """
|
||||||
|
line: 9
|
||||||
|
errormsg: "illegal discard"
|
||||||
|
"""
|
||||||
|
|
||||||
|
proc pop[T](arg: T): T =
|
||||||
|
echo arg
|
||||||
|
|
||||||
|
discard tillegaldiscard.pop
|
||||||
Loading…
Add table
Add a link
Reference in a new issue