Nullability for java.lang.ref.Reference.get

This commit is contained in:
Ilya Gorbunov
2016-12-04 20:02:24 +03:00
parent 84a7e3c032
commit c66b3b8ef9
6 changed files with 103 additions and 0 deletions
@@ -0,0 +1,15 @@
import java.lang.ref.*
fun notNull(r: WeakReference<String>) {
r.<caret>get()
}
fun nullable(r: WeakReference<String?>) {
r.<caret>get()
}
fun platform() {
val r = WeakReference("x")
r.<caret>get()
}