parser support for 'not nil' annotation

This commit is contained in:
Araq 2012-11-25 23:40:42 +01:00
commit 538699a281
2 changed files with 63 additions and 52 deletions

15
tests/reject/tnotnil.nim Normal file
View file

@ -0,0 +1,15 @@
discard """
line: 11
errormgs: "type mismatch"
"""
type
PObj = ref TObj not nil
TObj = object
x: int
var x: PObj = nil
proc p(x: string not nil): int =
result = 45