mirror of
https://github.com/apple/swift.git
synced 2026-03-04 18:24:35 +01:00
If the base captured type still has type variables when we bind the member function type, form a Sendable dependent function type with the base type. This will then be eliminated by TypeSimplifier once all the type variables in the base type have been resolved. This then allows us to remove the delaying logic from member lookup.
13 lines
287 B
Swift
13 lines
287 B
Swift
// RUN: %target-typecheck-verify-swift -swift-version 6
|
|
|
|
struct S<T> {}
|
|
extension S: Sendable where T: Sendable {}
|
|
extension S where T == Int {
|
|
func foo() {}
|
|
func foo(x: String) {}
|
|
}
|
|
|
|
// Make sure we can type-check this.
|
|
let _: () -> Void = S().foo
|
|
let _: (String) -> Void = S().foo
|