Anybody know of any previous discussion and/or You...
# random
s
Anybody know of any previous discussion and/or YouTrack tickets about why the indexed access operator doesn’t work with an empty vararg? I can understand why
items[]
might be reserved syntax — just can’t find a ticket about it.
Example:
Copy code
class Foo {
    operator fun get(vararg ss: String): String
}

val foo = Foo()
val s1 = foo["foo"] // fine
val s2 = foo[] // compile error