`val <K, V>SortedMap<K, V>.first get()...
# announcements
e
val <K, V>SortedMap<K, V>.first get() =...
d
Works for me...
e
uhm, me too
I must have wrote something nasty previously
k
Something like
val <T> T.foo get() = ...
doesn't work.
d
Yes, it does.
1
k
What? I remeber there being a compiler error on something like this.
g
No, it’s completely valid code
o
The (simplified) rule AFAIR is that all type parameters should be mentioned in the receiver type. Can’t do something like
val <T, R> T.prop : R …
👍 4