Files
kotlin-fork/compiler/testData/codegen/box/signatureAnnotations/reorderedParameterNames.kt
T
2020-03-11 22:08:59 +03:00

31 lines
570 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// FILE: A.java
// ANDROID_ANNOTATIONS
import kotlin.annotations.jvm.internal.*;
public class A {
public int connect(@ParameterName("host") int host, @ParameterName("port") int port) {
return host;
}
}
// FILE: test.kt
fun box(): String {
val test = A()
if (test.connect(host = 42, port = 8080) != 42) {
return "FAIL 1"
}
if (test.connect(port = 1234, host = 5678) != 5678) {
return "FAIL 2"
}
if (test.connect(9876, 4321) != 9876) {
return "FAIL 3"
}
return "OK"
}