Files
swift-mirror/test/Generics/non_generic_derived_class.swift
Jordan Rose 8f0cfe8e7b 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
2019-04-10 12:25:28 -07:00

19 lines
418 B
Swift

// RUN: %target-typecheck-verify-swift
class Base<T> {
class func f(_ arg: T) -> Int {
return 0
}
}
class Derived : Base<Int> {}
var a = Derived.f(42)
protocol SR9160_EmptyProtocol {}
class SR9160_AbstractFoobar<Foo> {}
// This used to cause the swift compiler to never finish compiling.
final class SR9160_SomeFoobar: SR9160_AbstractFoobar<SR9160_SomeFoobar.Foo> {
enum Foo: SR9160_EmptyProtocol {}
}