Avatar
Avatar
fummicc1
@swift-5.6.3 struct S {} func run <R>(body: () -> R) -> R { body() } func foo(x: S) -> S {x} func main() { run { let x = S() let y = foo(x: x) return y } }
exit status: 1 with <stdin>:10:9: error: cannot infer return type for closure with multiple statements; add explicit type to disambiguate run { ^ () -> <#Result#> in