Closed
Description
At present there is no way to check if a late variable is actually initialised or not,
Can we add a way to check this?
for example in Kotlin we can check if a lateinit variable is initialised :
Kotlin lateinit variables
If someone can point to where this code needs to be modified I can also work on this PR.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
julemand101 commentedon Dec 6, 2024
Sounds like a duplicate of: #1028
mateusfccp commentedon Dec 6, 2024
This one is closed, I think #3680 is equivalent and is still open.
lrhn commentedon Dec 6, 2024
I think #1028 is the best fit (and it being closed is a big hint that this is an unlikely feature to happen, at least by itself).
The #3680 does include a
??
operator for late variables, but I'd not expect that operator to be added alone, only if it's part of the change that also adds late parameters. For late variables, you're expected to know whether they're initialized.But definitely a duplicate of one or the other.