orangy
when
, you can just use object
instead of enum, and then use extension properties to add some more.
class Currency(val sign: String) {
companion object {
val USD = Currency("$")
val GBP = Currency("£")
val THB = Currency("฿")
}
}
// in some other place, even other module
val Currency.Companion.EUR: Currency get() = Currency("€")
fun test() {
val c1 = Currency.USD
val c2 = Currency.EUR
}