When using RxJava in Kotlin.When subscribing to a Single I use the following subscribe() overload
public final fun subscribe( onCallback: ((t1: User!, t2: Throwable!) -> Unit)!)
In the implementation I have a following check:
if (t1 == null) return@subscribe
This check generates a compile time warning that (t1==null) is always false
I wonder how does compiler know that at compile time if User! means that t1 can be of type User or User?