summary refs log tree commit diff stats
path: root/tests/generics/tmetafield.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/generics/tmetafield.nim')
-rw-r--r--tests/generics/tmetafield.nim30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/generics/tmetafield.nim b/tests/generics/tmetafield.nim
new file mode 100644
index 000000000..cf30a936d
--- /dev/null
+++ b/tests/generics/tmetafield.nim
@@ -0,0 +1,30 @@
+discard """
+  cmd: "nim check $options $file"
+  action: "reject"
+  nimout: '''
+tmetafield.nim(26, 5) Error: 'proc' is not a concrete type; for a callback without parameters use 'proc()'
+tmetafield.nim(27, 5) Error: 'Foo' is not a concrete type
+tmetafield.nim(29, 5) Error: invalid type: 'proc' in this context: 'TBaseMed' for var
+'''
+"""
+
+# bug #188
+
+
+
+
+
+
+
+
+# line 20
+type
+  Foo[T] = object
+    x: T
+
+  TBaseMed =  object
+    doSmth: proc
+    data: seq[Foo]
+
+var a: TBaseMed
+