Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/function/differentPackageTopLevel.kt
T

33 lines
451 B
Kotlin
Vendored

// FIR_IDENTICAL
// !CHECK_TYPE
// FILE: a.kt
package first
import checkSubtype
fun foo() {}
fun bar(x: Int) {}
fun baz() = "OK"
// FILE: b.kt
package other
import kotlin.reflect.*
import first.foo
import first.bar
import first.baz
import checkSubtype
fun main() {
val x = ::foo
val y = ::bar
val z = ::baz
checkSubtype<KFunction0<Unit>>(x)
checkSubtype<KFunction1<Int, Unit>>(y)
checkSubtype<KFunction0<String>>(z)
}