Daniel
02/07/2018, 6:49 PMval activityNonNull: Activity = Activity()
Log.d("Test", "${activityNonNull::class.java}")
val activityNullable: Activity? = Activity()
Log.d("Test", "${activityNullable::class.java}")
In the last line the compiler rightfully forbids the activityNullable::class.java
since activityNullable
can be null.
Might there be a syntax like the save call operator for this case? To prevent wrapping everything in an if
.