nickk
08/13/2018, 2:15 PMphoto
property is null, hasPhoto() seems to return true and control goes to the next statement (Kotlin 1.2.60)Czar
08/13/2018, 2:24 PMnull
to photo
it becomes initialized, so this is correct.
Although I wonder, how did you assign null to non-nullable property? Reflection?nickk
08/13/2018, 2:30 PMDenis A
08/13/2018, 2:31 PMnickk
08/13/2018, 2:32 PMDenis A
08/13/2018, 2:32 PMilya.gorbunov
08/13/2018, 6:17 PMopen
modifier?Tony Hoyle
08/13/2018, 6:20 PMnickk
08/14/2018, 7:55 AMlateinit
was a really bad idea in this case. I hadn’t thought that gson could set it to null anyway.