can somebody please let me know how to compare a e...
# announcements
a
can somebody please let me know how to compare a enum type? i tried the following but its raising syntax error
Copy code
enum class ViewType{

    LIST,
    GRID

}
val viewType:ViewType = ViewType.List
 if(viewType == ViewType.GRID){
}
The syntax error is like operator == cannot be applied to int and ViewType