mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
21 lines
424 B
Swift
21 lines
424 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)
|
|
|
|
// https://github.com/apple/swift/issues/51655
|
|
|
|
protocol EmptyProtocol {}
|
|
class AbstractFoobar<Foo> {}
|
|
// This used to cause the swift compiler to never finish compiling.
|
|
final class SomeFoobar: AbstractFoobar<SomeFoobar.Foo> {
|
|
enum Foo: EmptyProtocol {}
|
|
}
|