Skip to content

Commit 8f0cfe8

Browse files
authored
Add a test for using a nested type for a base class generic argument (#23920)
This used to cause an infinite loop in the compiler but now works fine. https://bugs.swift.org/browse/SR-9160
1 parent 14db05e commit 8f0cfe8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/Generics/non_generic_derived_class.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,10 @@ class Base<T> {
99
class Derived : Base<Int> {}
1010

1111
var a = Derived.f(42)
12+
13+
protocol SR9160_EmptyProtocol {}
14+
class SR9160_AbstractFoobar<Foo> {}
15+
// This used to cause the swift compiler to never finish compiling.
16+
final class SR9160_SomeFoobar: SR9160_AbstractFoobar<SR9160_SomeFoobar.Foo> {
17+
enum Foo: SR9160_EmptyProtocol {}
18+
}

0 commit comments

Comments
 (0)