Also note that if you do not explicitly specify a ...
# announcements
d
Also note that if you do not explicitly specify a type, your val's and method return types can have those platform types, too, delaying the null check!. In your case,
val y
is inferred to have type
String!
, you can assign it to both
String
and
String?
. If you do the former, you will get a null check. If you pass
y
to a Java method again, you will again, not get a null check, which is what I think is going on in your Mockito example.