summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorjcosborn <jcosborn@users.noreply.github.com>2018-10-19 04:18:13 -0500
committerAndreas Rumpf <rumpf_a@web.de>2018-10-19 11:18:13 +0200
commit3b1ade03507029ae96dc15190d453e2d71c9cf2b (patch)
tree32a5918999a511695750f889eb3223ab1b3b7a57
parent162e7ee5b5940235122c63f69344a0a44cf8e989 (diff)
downloadNim-3b1ade03507029ae96dc15190d453e2d71c9cf2b.tar.gz
added test for #4674 (#9438)
-rw-r--r--tests/types/taliasbugs.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/types/taliasbugs.nim b/tests/types/taliasbugs.nim
index 57254760a..bdb2a7a32 100644
--- a/tests/types/taliasbugs.nim
+++ b/tests/types/taliasbugs.nim
@@ -156,3 +156,14 @@ when true:
       Foo(i)
 
   var xx = xs.mapIt(asFoo($(it + 5)))
+
+
+block t4674:
+  type
+    FooObj[T] = object
+      v: T
+    Foo1[T] = FooObj[T]
+    Foo2 = FooObj
+    Foo1x = Foo1
+    Foo12x = Foo1 | Foo2
+    Foo2x = Foo2  # Error: illegal recursion in type 'Foo2x'