Join Slack
Powered by
just going through the katas(currently at Collecti...
# announcements
d
dla
10/15/2017, 5:54 PM
just going through the katas(currently at Collections/Sums[
https://try.kotlinlang.org/#/Kotlin%20Koans/Collections/Sum/Task.kt
]. i feel like 'sumByDouble{ it.someDoubleType}' is somewhat out of place. Why not just leave it at 'sum{ it.someDoubleType}' ?
i
ilya.gorbunov
10/15/2017, 6:03 PM
Currently function can't be overloaded by lambda return type, see
https://youtrack.jetbrains.com/issue/KT-11265
👍 1
d
dla
10/15/2017, 6:05 PM
thanks
n
Nicholas Bilyk
10/15/2017, 7:16 PM
Generics are erased, which includes lambda types. It would be nice if this didn't apply to inline functions with reified types though.
i
ilya.gorbunov
10/15/2017, 7:40 PM
@Nicholas Bilyk
The issue here is not only due to erasure, but due to type inference in the first place
3
Views
Open in Slack
Previous
Next