Hello, why can't I use `val` with the `lateinit` k...
# announcements
v
Hello, why can't I use
val
with the
lateinit
keyword? Using val on a local variable, I can separate the declaration and assignment, for example:
Copy code
val c: Int
c = 80
Why can't I do:
Copy code
lateinit val c: Int
And in my initialization,
Copy code
c = 8
Just to ensure that
c
is only set once