mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When typesSatisfyConstraint() is called with 'openArchetypes=true', archetypes are substituted with type variables. If they have conformances, they used to hit assertion in 'MakeAbstractConformanceForGenericType::operator()'. Adjust the assetion to accept 'TypeVariableType'. rdar://problem/56834798
24 lines
456 B
Swift
24 lines
456 B
Swift
// RUN: %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s
|
|
// RUN: %target-swift-ide-test -code-completion -code-completion-token=B -source-filename=%s
|
|
|
|
protocol Proto {}
|
|
|
|
struct S<T: Proto> {
|
|
typealias Value = T
|
|
|
|
func test(arg: Int) -> Value {
|
|
return #^A^#
|
|
}
|
|
}
|
|
|
|
class C: Proto {
|
|
init() {}
|
|
}
|
|
extension Proto {
|
|
typealias Nested = C
|
|
}
|
|
func receiver<T: Proto>(arg: T) {}
|
|
func test() {
|
|
receiver(arg: .#^B^#)
|
|
}
|