7c015564ce
Fun fact: this is not actually validated when loading the class; and even when compiling a java file against a class file that does this, only javac 9 has a check (1.8 and before simply crashes with NullPointerException somewhere deep inside the compiler).
16 lines
257 B
Kotlin
Vendored
16 lines
257 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// FILE: A.kt
|
|
class A {
|
|
fun f(vararg xs: String, y: String) = xs[0] + y
|
|
}
|
|
|
|
// FILE: B.java
|
|
public class B {
|
|
public static String f() {
|
|
return new A().f(new String[]{"O"}, "K");
|
|
}
|
|
}
|
|
|
|
// FILE: C.kt
|
|
fun box() = B.f()
|