Convert lambda to reference: flexible receiver types are handled correctly #KT-13411 Fixed
(cherry picked from commit ecad1c3)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
863e4afc7b
commit
a41c4b9a0f
@@ -0,0 +1,5 @@
|
||||
import java.util.List;
|
||||
|
||||
class B {
|
||||
public static List<Object> text;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import java.util.List;
|
||||
|
||||
class B {
|
||||
public static List<Object> text;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// See KT-13411
|
||||
|
||||
fun use() {
|
||||
B.text.map { <caret>it.toString() }
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// See KT-13411
|
||||
|
||||
fun use() {
|
||||
B.text.map(Any?::toString)
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import java.util.List;
|
||||
|
||||
class B {
|
||||
public static List<List<Object>> text;
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
import java.util.List;
|
||||
|
||||
class B {
|
||||
public static List<List<Object>> text;
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
// See KT-13411
|
||||
|
||||
fun use() {
|
||||
val text = B.text
|
||||
text.map { <caret>it.toString() }
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
// See KT-13411
|
||||
|
||||
fun use() {
|
||||
val text = B.text
|
||||
text.map(MutableList<Any>?::toString)
|
||||
}
|
||||
Reference in New Issue
Block a user