Matthieu Stombellini
02/05/2020, 10:27 PMimport Scratch_2.MyEnum.*
enum class MyEnum {
WORD, NUMBER, WHITESPACE
}
val myPairs = listOf(
"example" to WORD,
"42" to NUMBER,
" " to WHITESPACE
)
println(myPairs)
It does not work because of the import on line 1. Unresolved reference: Scratch_2
(note that I use Scratch_n
where n is whatever IntelliJ suggests in the autocompletion menu)
If I replace the first line by import MyEnum.*
directly, then the error is Unresolved reference: MyEnum
The only way of making this code work is by removing the import and specifying MyEnum
every time. Is there any way to make this work?Matthieu Stombellini
02/05/2020, 11:03 PME.Kisaragi
02/06/2020, 4:29 AMMatthieu Stombellini
02/06/2020, 9:18 AM