this seems to be better suited for here.
# language-evolution
c
this seems to be better suited for here.
u
like in swift, where enum values are resolved against the infered type:
Copy code
let myEnum: MyEnum = .myEnumValue
c
or in ruby
["abC","cdE"].map(&:downcase)
but thats more related to
listOf("aaa", "bbb").map(String::toLowerCase)
where
String
can also be infered.
e
In Kotlin
::id
is a reference to a top-level function named
id
without a receiver. For resolving against the inferred type there's a separate issue: KT-16768 Context-sensitive resolution (Resolve unqualified enum constants based on expected type)
u
You are certainly right
c
it would be really great if there was a short form for methods or fields of a known class.