Wrap with safe let call handles qualified calls correctly #KT-13262 Fixed

(cherry picked from commit 7044348)
This commit is contained in:
Mikhail Glukhikh
2016-07-28 12:13:46 +03:00
committed by Mikhail Glukhikh
parent 77b7648f10
commit b7fd41844d
7 changed files with 47 additions and 4 deletions
@@ -0,0 +1,8 @@
// "Wrap with '?.let { ... }' call" "true"
// WITH_RUNTIME
fun Int.foo(x: Int) = this + x
val arg: Int? = 42
val res = 24.hashCode().foo(<caret>arg)
@@ -0,0 +1,8 @@
// "Wrap with '?.let { ... }' call" "true"
// WITH_RUNTIME
fun Int.foo(x: Int) = this + x
val arg: Int? = 42
val res = arg?.let { 24.hashCode().foo(it) }
@@ -0,0 +1,8 @@
// "Wrap with '?.let { ... }' call" "true"
// WITH_RUNTIME
object Obj {
fun foo(x: Int) = x
}
val arg: Int? = null
val argFoo = Obj.foo(<caret>arg)
@@ -0,0 +1,8 @@
// "Wrap with '?.let { ... }' call" "true"
// WITH_RUNTIME
object Obj {
fun foo(x: Int) = x
}
val arg: Int? = null
val argFoo = arg?.let { Obj.foo(it) }