Hayk Baghdasaryan Thank you for the code.

Strangely this an open issue from Kotlin itself.

you can track this issue here.

This only happens with a lateinit property in Companion object.

As a workaround, you can use a nullable property (instance) and check if it is null in managerInstance and initialize if it is null and return.

--

--

https://agrawalsuneet.github.io/

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Suneet Agrawal

Suneet Agrawal

https://agrawalsuneet.github.io/

More from Medium

Introductions

What is Forta? What it is needed for and what problems this project solves.

The Wasteland, A Post-Apocalyptic Reading

Q&A with Sarah DeBolt Badawi: the educator behind the MLK Comic Book Study Guide