fixes #481
This commit is contained in:
parent
2464da5b26
commit
ff1d68c50b
3 changed files with 41 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
discard """
|
||||
errormsg: "'y' is provably nil"
|
||||
line:25
|
||||
line:38
|
||||
"""
|
||||
|
||||
import strutils
|
||||
|
|
@ -10,6 +10,19 @@ type
|
|||
TObj = object
|
||||
x, y: int
|
||||
|
||||
type
|
||||
superstring = string not nil
|
||||
|
||||
|
||||
proc q(s: superstring) =
|
||||
echo s
|
||||
|
||||
proc p2() =
|
||||
var a: string = "I am not nil"
|
||||
q(a) # but this should and does not
|
||||
|
||||
p2()
|
||||
|
||||
proc q(x: pointer not nil) =
|
||||
nil
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue