mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Absence of synthetic generic environment should not affect serialization of the required substitutions because they can come from outer requirement context for static members. Resolves: rdar://problem/36497404
45 lines
910 B
Swift
45 lines
910 B
Swift
// RUN: %target-build-swift -emit-module -o %t %s
|
|
|
|
public protocol P1 {}
|
|
public protocol P2 {}
|
|
|
|
public protocol P3 {
|
|
static func a()
|
|
|
|
func b()
|
|
func b<I: P1>(_: (I) -> Void)
|
|
|
|
static func c<I: P1>(_: I)
|
|
static func d()
|
|
static func d<I: P1>(_: ([(I, I)]) -> Void)
|
|
static func d<I: P1>(_: ([I: I]) -> Void)
|
|
static func d<Q: P1>(_: Q)
|
|
|
|
static func e<Q: P1, I: P2>(_: Q, _: (I) -> Void)
|
|
static func f<Q: P1, I: P2>(_: Q, _: (I) -> Void)
|
|
|
|
func g<I: P1>(_: I)
|
|
}
|
|
|
|
public extension P3 {
|
|
static func a() {}
|
|
|
|
func b() {}
|
|
func b<I: P1>(_: (I) -> Void) {}
|
|
|
|
static func c<I: P1>(_: I) {}
|
|
|
|
static func d() {}
|
|
static func d<I: P1>(_: ([(I, I)]) -> Void) {}
|
|
static func d<I: P1>(_: ([I: I]) -> Void) {}
|
|
static func d<Q: P1>(_: Q) {}
|
|
|
|
static func e<Q: P1, I: P2>(_: Q, _: (I) -> Void) {}
|
|
static func f<Q: P1, I: P2>(_: Q, _: (I) -> Void) {}
|
|
|
|
func g<I: P1>(_: I) {}
|
|
}
|
|
|
|
struct S: P3 {
|
|
}
|