Files
swift-mirror/test/IDE/complete_uninferred_generic.swift
Hamish Knight 669a2ce9b0 [CS] Sink placeholder handling logic into Solution::simplifyType
Move the logic from `FailureDiagnostic::resolveType` into
`Solution::simplifyType` to allow completion to use it too. While
here, also handle cases where the placeholder is from a different
member of the equivalence class to the generic parameter.
2025-10-04 12:56:52 +01:00

19 lines
634 B
Swift

// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=UNINFERRED | %FileCheck %s -check-prefix=UNINFERRED
struct S1<V0> {}
protocol P1 {
associatedtype A1
}
extension P1 where A1 == S1<Int> {
subscript<T>(v0: T) -> Int { fatalError() }
subscript<T>(v0: T) -> Undefined { fatalError() }
}
struct S2<T> : P1 {
typealias A1 = S1<T>
}
_ = S2()#^UNINFERRED^#
// UNINFERRED-DAG: Decl[Subscript]/Super: [{#(v0): T#}][#Int#]; name=[:]
// UNINFERRED-DAG: Decl[Subscript]/Super: [{#(v0): T#}][#_#]; name=[:]
// UNINFERRED-DAG: Keyword[self]/CurrNominal: .self[#S2<T>#]; name=self