Daniel
07/04/2019, 9:38 PMIntrinsics.checkParameterIsNotNull(..., "....");
but not the returned value.
The first question would be, how can this happen that a returned value is null even when its defined as not null? Unfortunately we got a data class for a backend response wrong: We set a property of the data class as non null, but it was nullable in the backend. So Gson was putting null in it.
The said property was then propagated through different methods via return
and way higher up something crashed. If there were a Intrinsic check in place in every method we would have had an easier time debugging the issue.
There is most definitely a reason for why the kotlin team decided against it and I am curious for it! 🙂groostav
07/04/2019, 9:57 PMAdam Powell
07/04/2019, 10:00 PMgroostav
07/04/2019, 10:02 PMgroostav
07/04/2019, 10:03 PMPaul Woitaschek
07/05/2019, 6:47 AMDaniel
07/05/2019, 2:45 PMxyz = null
in disguise. Funny things you encounter 😉