mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Test: Add a todo about a regression introduced by generic mismatch diagnostic
This commit is contained in:
@@ -21,7 +21,7 @@ func test() {
|
||||
}
|
||||
|
||||
// SR-7339
|
||||
class Some<T, V> {
|
||||
class Some<T, V> { // expected-note {{'V' declared as parameter to type 'Some'}}
|
||||
init(keyPath: KeyPath<T, ((V) -> Void)?>) {
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,9 @@ class Demo {
|
||||
}
|
||||
|
||||
// FIXME: This error is better than it was, but the diagnosis should break it down more specifically to 'here's type.
|
||||
// TODO(diagnostics): Fix this regression, we want the following error message ideally
|
||||
// "cannot convert value of type 'ReferenceWritableKeyPath<Demo, (() -> Void)?>' to expected argument type 'KeyPath<_, ((_) -> Void)?>'"
|
||||
let some = Some(keyPath: \Demo.here)
|
||||
// expected-error@-1 {{cannot convert value of type 'ReferenceWritableKeyPath<Demo, (() -> Void)?>' to expected argument type 'KeyPath<_, ((_) -> Void)?>'}}
|
||||
// expected-error@-1 {{generic parameter 'V' could not be inferred}}
|
||||
// expected-note@-2 {{explicitly specify the generic arguments to fix this issue}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user