... or, as someone proposed a while ago, ``` objec...
# language-proposals
d
... or, as someone proposed a while ago,
Copy code
object A {
    operator fun <T> get(vararg x: T): Array<out T> = x
}

val test1: MutableList<Int> = A[1, 2, 3].toMutableList()
val test2: Set<String> = A["1", "2", "3"].toSet()
This would not work for annotations, though.