diff options
author | Araq <rumpf_a@web.de> | 2012-12-02 20:02:42 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-12-02 20:02:42 +0100 |
commit | 8948a97151fc000414aee7cd4064881ef646a26c (patch) | |
tree | 89b5deb1448d0281028f3a02ca28ee11dec09f25 /tests/reject | |
parent | 0916137287b1d1468810f0ad4cf638eed5436f5e (diff) | |
download | Nim-8948a97151fc000414aee7cd4064881ef646a26c.tar.gz |
bugfix: 'not nil' and 'shared' types
Diffstat (limited to 'tests/reject')
-rw-r--r-- | tests/reject/tnotnil.nim | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/reject/tnotnil.nim b/tests/reject/tnotnil.nim index 8676aedf8..b02e33713 100644 --- a/tests/reject/tnotnil.nim +++ b/tests/reject/tnotnil.nim @@ -1,5 +1,5 @@ discard """ - line: 11 + line: 22 errormgs: "type mismatch" """ @@ -7,9 +7,17 @@ type PObj = ref TObj not nil TObj = object x: int + + MyString = string not nil -var x: PObj = nil +#var x: PObj = nil proc p(x: string not nil): int = result = 45 +proc q(x: MyString) = nil +proc q2(x: string) = nil + +q2(nil) +q(nil) + |