mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
1f008fb0d0
And update tests to use them. This commit depends on fixes in swiftlang/swift PRs #86905, #87129, and #87130. Fixes rdar://169749886.
27 lines
1.0 KiB
Swift
27 lines
1.0 KiB
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-emit-module-interface(%t/Test.swiftinterface) %s -module-name Test
|
|
// RUN: %target-swift-typecheck-module-from-interface(%t/Test.swiftinterface) -module-name Test
|
|
// RUN: %FileCheck %s < %t/Test.swiftinterface
|
|
|
|
public protocol P {
|
|
}
|
|
|
|
public class Foo<T> : P {
|
|
public struct Nested {}
|
|
}
|
|
|
|
extension P {
|
|
public static func blah1<T>(_: Self) where Self == Foo<T> {}
|
|
public static func blah2<T>(_: Self.Nested) where Self == Foo<T> {}
|
|
|
|
public static func blah3<T>(_: Self) where Self : Foo<T> {}
|
|
public static func blah4<T>(_: Self.Nested) where Self : Foo<T> {}
|
|
}
|
|
|
|
// CHECK-LABEL: extension Test::P {
|
|
// CHECK-NEXT: public static func blah1<T>(_: Self) where Self == Test::Foo<T>
|
|
// CHECK-NEXT: public static func blah2<T>(_: Test::Foo<T>.Test::Nested) where Self == Test::Foo<T>
|
|
// CHECK-NEXT: public static func blah3<T>(_: Self) where Self : Test::Foo<T>
|
|
// CHECK-NEXT: public static func blah4<T>(_: Test::Foo<T>.Test::Nested) where Self : Test::Foo<T>
|
|
// CHECK-NEXT: }
|