summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-01-11 02:23:39 +0100
committerAraq <rumpf_a@web.de>2015-01-11 02:23:39 +0100
commitfd10866ae301c43adff35ac427b6765f80689478 (patch)
tree3f8a58b2737fa0511fd589cf9467e440bb9df192 /tests
parentd37ff0ab4248a4a36bffa8fbf423b4796ced8c58 (diff)
downloadNim-fd10866ae301c43adff35ac427b6765f80689478.tar.gz
fixes #1919
Diffstat (limited to 'tests')
-rw-r--r--tests/generics/tgeneric_inheritance.nim19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/generics/tgeneric_inheritance.nim b/tests/generics/tgeneric_inheritance.nim
new file mode 100644
index 000000000..66b5a6c69
--- /dev/null
+++ b/tests/generics/tgeneric_inheritance.nim
@@ -0,0 +1,19 @@
+discard """
+  output: '0.0'
+"""
+
+# bug #1919
+
+type
+  Base[M] = object of RootObj
+    a : M
+
+  Sub1[M] = object of Base[M]
+    b : int
+
+  Sub2[M] = object of Sub1[M]
+    c : int
+
+var x: Sub2[float]
+
+echo x.a