bod
06/27/2019, 8:24 AMfun foo(vararg pairs: Pair<String, (String) -> FooBar>)
When I call it like this:
foo(
"a" to { _ -> FooBar() },
"b" to { _ -> FooBar() }
)
I get warning saying that _ ->
is redundant. But, if I remove it I get
Type inference failed. Expected type mismatch: inferred type is Pair<String, () -> FooBar> but Pair<String, (String) -> FooBar> was expected
Could this be a problem with the "new type inference algorithm"?karelpeeters
06/27/2019, 9:34 AMbod
06/27/2019, 9:54 AM_ ->
karelpeeters
06/27/2019, 10:11 AMbod
06/27/2019, 11:36 AMRuckus
06/27/2019, 3:33 PMbod
06/27/2019, 3:39 PM