new tester; all tests categorized
This commit is contained in:
parent
51ee524109
commit
20b5f31c03
481 changed files with 794 additions and 2506 deletions
24
tests/notnil/tnotnil2.nim
Normal file
24
tests/notnil/tnotnil2.nim
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
discard """
|
||||
errormsg: "cannot prove 'y' is not nil"
|
||||
line:20
|
||||
"""
|
||||
|
||||
import strutils
|
||||
|
||||
|
||||
type
|
||||
TObj = object
|
||||
x, y: int
|
||||
|
||||
proc q(x: pointer not nil) =
|
||||
nil
|
||||
|
||||
proc p() =
|
||||
var x: pointer
|
||||
let y = x
|
||||
if not y.isNil or y != x:
|
||||
q(y)
|
||||
else:
|
||||
q(y)
|
||||
|
||||
p()
|
||||
Loading…
Add table
Add a link
Reference in a new issue