https://kotlinlang.org logo
#announcements
Title
# announcements
d

Dalinar

08/27/2017, 4:42 AM
I'm getting an NPE when trying to access my lazy val .. can't debug it either.. the breakpoint doesn't fire, so that seems to explain why the val is not being assigned the lazy result... so my question is, is accessing a lazy val of a subclass called from a constructor of a parent class not supported? ( in my case it is not a direct parent calling the code that ultimately triggers the acccess in the subclass containing the lazy defined property, more like the ultimate parent the one that extends
Object
it is a java class, its subclasses are all Kotlin)
r

radityagumay

08/27/2017, 6:32 AM
Could you provide code
d

Dalinar

08/27/2017, 8:19 AM
I guess it just initializes as a normal variable any follows this pattern... [An in-depth look at Kotlin’s initializers – Kotlin.Link](https://kotlin.link/articles/An-in-depth-look-at-Kotlin%E2%80%99s-initializers.html) ..
4 Views