Sure() for generic arrays and collections

Hello, is there any way in Kotlin to make this code work:

``

val test : Array<String> = “a,b,c”.split(“,”).sure()


without performance overhead?
Now it requires Array<String?> as return value.

This problem is going to be fixed.

Currently, you can say “as Array<String>” at the end of the line.

Thanks! Is there a tracker issue for that? Can you provide one?

http://youtrack.jetbrains.com/issue/KT-1278 is close to what you request. You can create a more presice issue or comment on this one.