This code does not compile:
object Token extends Enumeration {
type ID = Value
val Key, Value = Value
}
error: recursive value Value needs type
What should be done to have 'Value' in the enumeration ?
This code does not compile:
object Token extends Enumeration {
type ID = Value
val Key, Value = Value
}
error: recursive value Value needs type
What should be done to have 'Value' in the enumeration ?
This is not possible because Value
is already a final member of Enumeration
- the obvious suggestion is to call your field Val
instead.