Suspicious callable reference: no quick fix with invalid reference type

#KT-23467 Fixed
This commit is contained in:
Toshiaki Kameyama
2018-08-04 14:40:23 +03:00
committed by Mikhail Glukhikh
parent 0ac969a617
commit b91f30ab15
7 changed files with 85 additions and 7 deletions
@@ -0,0 +1,6 @@
// WITH_RUNTIME
// FIX: none
fun test(x: Int) {
fun p(s: String): Boolean = true
x.let {<caret> ::p }
}
@@ -0,0 +1,6 @@
// WITH_RUNTIME
// FIX: none
fun test(x: Int) {
val p = { _: String -> true }
x.run {<caret> p::invoke }
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
// FIX: none
fun test(x: Int, y: String) {
x.run {<caret> y::length }
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
// FIX: none
fun test(x: Int) {
x.run {<caret> String::length }
}