kastork
12/07/2017, 8:53 PMlateinit
vars cannot be primitive types. If you're trying to create a bean-compliant class, how do you designate an Integer
or Double
type? If you make the property type Int
you get the error that primitive types can't be lateinit
, if you give it the type Integer
you get the warning that you shouldn't use Integers
but should use Int
.. And for Double
there doesn't even appear to be a way to say you want the Object Double
and not a primitive double
r4zzz4k
12/07/2017, 8:59 PMInt?
should always correspond to Integer
, so you can use that. And you can create additional @Transient
property with overriden get()
and set()
which would allow to avoid constant !!
-ing. Not the best solution, but should work. Maybe someone could suggest better options though.kastork
12/07/2017, 9:01 PMr4zzz4k
12/07/2017, 9:09 PMkarelpeeters
12/07/2017, 9:17 PMkastork
12/07/2017, 9:18 PMr4zzz4k
12/07/2017, 9:29 PMkarelpeeters
12/07/2017, 9:30 PM