groostav
06/06/2016, 10:33 PMinterface List{
companion object{
operator fun <T> get(vararg x: T): List<out T> = x.toList()
}
}
then I believe this will work
val x = List[1, 2, 3]
val y = Map[1 to "a", 2 to "b"]
but is List[]
really any nicer than listOf()
? I suppose now you can ctrl + click on List
and get to the interface definition rather than the function.