Wrap with safe let call handles qualified calls correctly #KT-13262 Fixed
(cherry picked from commit 7044348)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
77b7648f10
commit
b7fd41844d
@@ -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) }
|
||||
Reference in New Issue
Block a user