mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
25 lines
288 B
Nim
25 lines
288 B
Nim
discard """
|
|
errormsg: "cannot prove 'y' is not nil"
|
|
line:20
|
|
"""
|
|
|
|
import strutils
|
|
{.experimental: "notnil".}
|
|
|
|
type
|
|
TObj = object
|
|
x, y: int
|
|
|
|
proc q(x: pointer not nil) =
|
|
discard
|
|
|
|
proc p() =
|
|
var x: pointer
|
|
let y = x
|
|
if not y.isNil or y != x:
|
|
q(y)
|
|
else:
|
|
q(y)
|
|
|
|
p()
|