mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 03:02:31 +00:00
28 lines
298 B
Nim
28 lines
298 B
Nim
discard """
|
|
errormsg: "'y' is provably nil"
|
|
line:25
|
|
"""
|
|
|
|
import strutils
|
|
{.experimental: "notnil".}
|
|
|
|
type
|
|
TObj = object
|
|
x, y: int
|
|
|
|
proc q(x: pointer not nil) =
|
|
discard
|
|
|
|
proc p() =
|
|
var x: pointer
|
|
if not x.isNil:
|
|
q(x)
|
|
|
|
let y = x
|
|
if not y.isNil:
|
|
q(y)
|
|
else:
|
|
q(y)
|
|
|
|
p()
|