JVM_IR KT-46092 fix array spread operator in Kotlin->Java call
This commit is contained in:
committed by
TeamCityServer
parent
b5fae96934
commit
cc415f62b5
+21
@@ -0,0 +1,21 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// FILE: kt46092.kt
|
||||
|
||||
class CharSequenceBackedByChars : CharArrayCharSequence {
|
||||
constructor(chars: CharArray) : super(*chars)
|
||||
|
||||
fun test(): String = string
|
||||
}
|
||||
|
||||
fun box() = CharSequenceBackedByChars(charArrayOf('O', 'K')).test()
|
||||
|
||||
// FILE: CharArrayCharSequence.java
|
||||
|
||||
public class CharArrayCharSequence {
|
||||
protected final String string;
|
||||
|
||||
public CharArrayCharSequence(char... chars) {
|
||||
string = new String(chars);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user