New J2K: correctly convert main method with varargs argument
#KT-33756 fixed
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
public class Main {
|
||||
public static void main(String... args) {
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
object Main {
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
}
|
||||
}
|
||||
+3
-15
@@ -1,19 +1,7 @@
|
||||
object ArrayInitializerBugKt {
|
||||
private val GREETING = byteArrayOf(
|
||||
'H'.toByte(),
|
||||
'e'.toByte(),
|
||||
'l'.toByte(),
|
||||
'l'.toByte(),
|
||||
'o'.toByte(),
|
||||
','.toByte(),
|
||||
' '.toByte(),
|
||||
'b'.toByte(),
|
||||
'u'.toByte(),
|
||||
'g'.toByte(),
|
||||
'!'.toByte()
|
||||
)
|
||||
|
||||
fun main(vararg args: String?) {
|
||||
private val GREETING = byteArrayOf('H'.toByte(), 'e'.toByte(), 'l'.toByte(), 'l'.toByte(), 'o'.toByte(), ','.toByte(), ' '.toByte(), 'b'.toByte(), 'u'.toByte(), 'g'.toByte(), '!'.toByte())
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
val greeting = String(GREETING)
|
||||
println(greeting)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user