mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 15:53:40 +00:00
25 lines
401 B
Kotlin
Vendored
25 lines
401 B
Kotlin
Vendored
// !CHECK_TYPE
|
|
// FILE: test/A.java
|
|
|
|
package test
|
|
|
|
import java.util.Arrays;
|
|
|
|
public class A {
|
|
public static void main(String[] args) {
|
|
System.out.println(Arrays.asList(args));
|
|
}
|
|
}
|
|
|
|
// FILE: 1.kt
|
|
|
|
import kotlin.reflect.*
|
|
import test.A
|
|
|
|
fun foo(args: Array<String>) {
|
|
val main2 = A::main
|
|
checkSubtype<KFunction1<Array<String>, Unit>>(main2)
|
|
main2(args)
|
|
(A::main)(args)
|
|
}
|