make 'not nil' experimental

This commit is contained in:
Andreas Rumpf 2018-05-01 10:48:46 +02:00 • committed by Araq
commit 599b5d6dcb
14 changed files with 27 additions and 16 deletions

View file

@ -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)