make 'not nil' experimental
This commit is contained in:
parent
cc0ca43743
commit
599b5d6dcb
14 changed files with 27 additions and 16 deletions
|
|
@ -2,7 +2,7 @@ discard """
|
|||
line: 22
|
||||
errormsg: "type mismatch"
|
||||
"""
|
||||
|
||||
{.experimental: "notnil".}
|
||||
type
|
||||
PObj = ref TObj not nil
|
||||
TObj = object
|
||||
|
|
@ -15,8 +15,8 @@ type
|
|||
proc p(x: string not nil): int =
|
||||
result = 45
|
||||
|
||||
proc q(x: MyString) = nil
|
||||
proc q2(x: string) = nil
|
||||
proc q(x: MyString) = discard
|
||||
proc q2(x: string) = discard
|
||||
|
||||
q2(nil)
|
||||
q(nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue