Pass data flow info from '::' expressions, fix expected type
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
fun f1(x: String?): String {
|
||||
x!!::hashCode
|
||||
return <!DEBUG_INFO_SMARTCAST!>x<!>
|
||||
}
|
||||
|
||||
fun f2(y: String?): String {
|
||||
val f: KClass<*> = (y ?: return "")::class
|
||||
return <!DEBUG_INFO_SMARTCAST!>y<!>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
public fun f1(/*0*/ x: kotlin.String?): kotlin.String
|
||||
public fun f2(/*0*/ y: kotlin.String?): kotlin.String
|
||||
@@ -0,0 +1,12 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
fun test(s: String) {
|
||||
val f: () -> Int = s::hashCode
|
||||
val g: () -> String = s::toString
|
||||
val h: (Any?) -> Boolean = s::equals
|
||||
|
||||
val k: KClass<String> = s::class
|
||||
val l: KClass<*> = s::class
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
public fun test(/*0*/ s: kotlin.String): kotlin.Unit
|
||||
Reference in New Issue
Block a user