What about `lazyVar` in kotlin? I have synchronize...
# announcements
n
What about
lazyVar
in kotlin? I have synchronized implementation here: https://gist.github.com/neworld/843d99e7f7a783713b5593bba888249a tl;tr;
lazyVar
should fulfill these tests:
Copy code
var fixture: Int by lazyVar { 1 }

    @Test
    fun testLazyInitialization() {
        assertEquals(1, fixture)
    }

    @Test
    fun testOverrideInitializedVariable() {
        assertEquals(1, fixture)

        fixture = 2

        assertEquals(2, fixture)
    }

    @Test
    fun testSetVariableBeforeInitialization() {
        fixture = 2

        assertEquals(2, fixture)
    }