From 3b1ade03507029ae96dc15190d453e2d71c9cf2b Mon Sep 17 00:00:00 2001 From: jcosborn Date: Fri, 19 Oct 2018 04:18:13 -0500 Subject: [PATCH] added test for #4674 (#9438) --- tests/types/taliasbugs.nim | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/types/taliasbugs.nim b/tests/types/taliasbugs.nim index 57254760a4..bdb2a7a32c 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'