Files
swift-mirror/test/Constraints/sendable_dependence.swift
Hamish Knight a615b4cf02 [CS] Use Sendable dependence in adjustFunctionTypeForConcurrency
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.
2026-01-27 11:06:54 +00:00

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