"Add not-null asserted (!!) call": add '!!' to receiver of function reference

#KT-37841 Fixed
This commit is contained in:
Toshiaki Kameyama
2020-05-21 20:16:54 +09:00
committed by igoriakovlev
parent 5e5e19f482
commit 35459d2ca7
8 changed files with 86 additions and 7 deletions
@@ -0,0 +1,12 @@
// "Add non-null asserted (!!) call" "true"
class Foo {
val bar = Bar()
}
class Bar {
fun f() = 1
}
fun test(foo: Foo?) {
val f = foo?.bar::f<caret>
}