Skip to content

Commit d850ed6

Browse files
committed
Fix test that didn't actually improve
1 parent d752f41 commit d850ed6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/Constraints/keypath.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ func testFunc() {
4141
let _: (S) -> Int = \.i
4242
_ = ([S]()).map(\.i)
4343

44+
// FIXME: A terrible error, but the same as the pre-existing key path
45+
// error in the similar situation: 'let _ = \S.init'.
4446
_ = ([S]()).map(\.init)
45-
// expected-error@-1 {{key path cannot refer to static member 'init()'}}
46-
// expected-error@-2 {{key path value type '() -> S' cannot be converted to contextual type '_'}}
47+
// expected-error@-1 {{type of expression is ambiguous without more context}}
4748

4849
let kp = \S.i
4950
let _: KeyPath<S, Int> = kp // works, because type defaults to KeyPath nominal

0 commit comments

Comments
 (0)