hey can anyone tell me why when I try declare List...
# getting-started
m
hey can anyone tell me why when I try declare List of enums I get error
No type arguments expected for class List
l
Can you post your code?
m
Give me a moment.
Copy code
enum class ServiceType {
    ONE, TWO, THREE
}

data class Services(val services: List<ServiceType>) {
    constructor() : this(listOfNotNull(ServiceType.ONE))
}
it's similar to this one
fun fact is that it isn't show such error for AbstractList
k
You may have some other class called
List
imported?
m
lul you are right! java.awt.List
😁 1
thanks!
k
You can exclude the awt stuff from autoimports in the Intelij settings.
m
hmm, can I also apply such thing for Android Studio?
l
Yes
m
thanks guys 😄, trivial problem solved
k
After the 10th time an awt class messes up you code you start to catch on 🙂