Kroppeb
09/01/2019, 10:41 AMclass enum<T:Types<R>, R>(Name: String) : Types<R>(Name)
but is it possible to have the following
val p = enum<varInt>("NextState"))
// instead of
val p = enum<varInt, Int>("NextState"))
// varInt
class varInt(Name: String) : Types<Int>(Name)
wasyl
09/01/2019, 11:49 AMalex009
09/01/2019, 3:19 PMKroppeb
09/01/2019, 3:37 PMwasyl
09/01/2019, 4:05 PMtypealias IntEnum = enum<varInt, Int>
so that you can write val p = IntEnum("NextState")
. That would work only in case you use limited number of generic parametersalex009
09/01/2019, 4:12 PMtypealias TypeAlias<T> = enum<Types<T>, T>
but now i see that you want pass name to Types<Int>
class...here typealias not help, yes