todo and explicit cast were added after some kotli...
# announcements
r
todo and explicit cast were added after some kotlin update. when compiler started marking this piece of code as error - however if fact it is error previously
+
operator was resolved as 1.
public operator fun <T> Collection<T>.plus(element: T): List<T> //from _Collections.kt
2a.
public operator fun <T> Collection<T>.plus(elements: Iterable<T>): List<T> //from _Collections.kt
or as this 2b.
public operator fun <T> Collection<T>.plus(elements: Sequence<T>): List<T> //from _Collections.kt
I'm not sure whether it was 2a. or 2b. and have no means to check it right now (maybe there was some other function as well) however now (kotlin 1.0.0-beta-4584)
+
is resolved as 1.
public operator fun <T> Collection<T>.plus(element: T): List<T> //from _Collections.kt
2.
operator fun <T: Any> T.plus(list: List<T>): List<T> //from utils.kt
which makes my code behave not in a way it was intended Why is function
2.
picked instead of
2a.
or
2b.
where the latter are more "specialized"? P.S. yes, I shouldn't be so careless with compiler warnings in the first place, but nonetheless question on "specialization" of extension remains open.