<@U0BUH9FRD> the thing is that `lateinit` uses `nu...
# announcements
a
@sdeleuze the thing is that
lateinit
uses
null
as “not-initialized”, at the same time
Int
will be interpreted as primitive java
int
whenever possible to avoid allocation on heap, that means that combination of any primitive types with
lateinit
is not possible because
lateinit
needs reference type (for
null
) but primitives are not reference types… We’re facing it from time to time and have to fallback to
Delegates.notNull()
as suggested before, you can vote for IDE quickfix for that https://youtrack.jetbrains.com/issue/KT-12515