Avatar
Avatar
omochimetaru
@swift-5.8.1 struct S { var a = 0 } func foo(_ x: ((S) -> Int)? = nil) {} foo(\.a)
swift58 BOT 3/8/2024 7:48 AM
exit status: 1 with <stdin>:7:5: error: cannot convert value of type '_' to expected argument type '((S) -> Int)?' foo(\.a) ^ <stdin>:7:5: error: cannot infer key path type from context; consider explicitly specifying a root type foo(\.a) ^ <#Root#>