mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 15:53:40 +00:00
18 lines
305 B
Kotlin
Vendored
18 lines
305 B
Kotlin
Vendored
// !CHECK_TYPE
|
|
|
|
import kotlin.reflect.*
|
|
|
|
fun foo() {}
|
|
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
|
|
fun baz() = "OK"
|
|
|
|
fun main() {
|
|
val x = ::foo
|
|
val y = ::bar
|
|
val z = ::baz
|
|
|
|
checkSubtype<KFunction0<Unit>>(x)
|
|
checkSubtype<KFunction1<Int, Unit>>(y)
|
|
checkSubtype<KFunction0<String>>(z)
|
|
}
|