summary refs log tree commit diff stats
path: root/tests/reject
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-12-02 20:02:42 +0100
committerAraq <rumpf_a@web.de>2012-12-02 20:02:42 +0100
commit8948a97151fc000414aee7cd4064881ef646a26c (patch)
tree89b5deb1448d0281028f3a02ca28ee11dec09f25 /tests/reject
parent0916137287b1d1468810f0ad4cf638eed5436f5e (diff)
downloadNim-8948a97151fc000414aee7cd4064881ef646a26c.tar.gz
bugfix: 'not nil' and 'shared' types
Diffstat (limited to 'tests/reject')
-rw-r--r--tests/reject/tnotnil.nim12
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)
+