mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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.
This commit is contained in:
@@ -56,7 +56,7 @@ class A {
|
||||
var a: MyArray<Int>
|
||||
init() {
|
||||
a = MyArray<Int // expected-error {{generic parameter 'Element' could not be inferred}} expected-note {{explicitly specify the generic arguments to fix this issue}}
|
||||
// expected-error@-1 {{binary operator '<' cannot be applied to operands of type 'MyArray<_>.Type' and 'Int.Type'}}
|
||||
// expected-error@-1 {{binary operator '<' cannot be applied to operands of type 'MyArray<Element>.Type' and 'Int.Type'}}
|
||||
// expected-error@-2 {{cannot assign value of type 'Bool' to type 'MyArray<Int>'}}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user