mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
add illegal discard test
This commit is contained in:
committed by
Andreas Rumpf
parent
b306e0bfe2
commit
fdd09ad090
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
|
||||
Reference in New Issue
Block a user