evkaky
09/11/2017, 4:40 PMjanvladimirmostert
09/11/2017, 4:57 PMkarelpeeters
09/11/2017, 6:03 PMdarkmoon_uk
09/24/2017, 12:02 PMsealed class
what you are after? These are very powerful and flexible, and can behave semantically like a `union`ed type in C (even if the underlying memory layout/usage doesn't follow suit).karelpeeters
09/24/2017, 12:12 PMtypedef Value = String | Int
, you can emulate it with container sealed classes but that's a lot of boilerplate.darkmoon_uk
09/24/2017, 12:33 PMsealed class Value {
data class String( value: String ) : Value()
data class Int( value: Int ) : Value()
}
karelpeeters
09/24/2017, 1:23 PM