Wrap with let: fix it works correctly for invoking function type
#KT-39182 Fixed
This commit is contained in:
committed by
igoriakovlev
parent
babdeacdaf
commit
f6e70cfed8
@@ -0,0 +1,10 @@
|
||||
// "Wrap with '?.let { ... }' call" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface Foo {
|
||||
val bar: ((Int) -> Unit)?
|
||||
}
|
||||
|
||||
fun test(foo: Foo) {
|
||||
foo.bar<caret>(1)
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Wrap with '?.let { ... }' call" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface Foo {
|
||||
val bar: ((Int) -> Unit)?
|
||||
}
|
||||
|
||||
fun test(foo: Foo) {
|
||||
foo.bar?.let { it(1) }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Wrap with '?.let { ... }' call" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface Foo {
|
||||
val bar: ((Int) -> Unit)?
|
||||
}
|
||||
|
||||
fun Foo.test() {
|
||||
<caret>bar(1)
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Wrap with '?.let { ... }' call" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface Foo {
|
||||
val bar: ((Int) -> Unit)?
|
||||
}
|
||||
|
||||
fun Foo.test() {
|
||||
bar?.let { it(1) }
|
||||
}
|
||||
Reference in New Issue
Block a user