Files
kotlin/compiler/testData/codegen/bytecodeText/kt7188.kt
Alexander Udalov f5ff3d2fa9 Remove directives that have no effect from bytecode text tests
All bytecode text tests are run with stdlib in the classpath and only
for JVM backend, therefore directives WITH_RUNTIME, TARGET_BACKEND,
IGNORE_BACKEND are not needed
2018-12-20 12:53:24 +01:00

44 lines
1.1 KiB
Kotlin
Vendored

// FILE: Dummy.kt
// Empty body to trigger multifile test mode
// FILE: Test.kt
class TestMethod {
companion object {
@JvmStatic
fun test(s0: String, s1: String?) = s0 + (s1 ?: "null")
}
}
class TestMethodOverloads {
companion object {
@JvmStatic
@JvmOverloads
fun test(s0: String = "s0", s1: String = "s1", s2: String = "s2") = s0 + s1 + s2
}
}
class TestProperty {
companion object {
@JvmStatic
var prop: String = "Blah"
}
}
class TestAccessor {
companion object {
var prop: String = "Blah" @JvmStatic set
}
}
// @TestMethod.class:
// 0 INVOKESTATIC kotlin/jvm/internal/Intrinsics.checkParameterIsNotNull \(Ljava/lang/Object;Ljava/lang/String;\)V
// @TestMethodOverloads.class:
// 0 INVOKESTATIC kotlin/jvm/internal/Intrinsics.checkParameterIsNotNull \(Ljava/lang/Object;Ljava/lang/String;\)V
// @TestProperty.class:
// 0 INVOKESTATIC kotlin/jvm/internal/Intrinsics.checkParameterIsNotNull \(Ljava/lang/Object;Ljava/lang/String;\)V
// @TestAccessor.class:
// 0 INVOKESTATIC kotlin/jvm/internal/Intrinsics.checkParameterIsNotNull \(Ljava/lang/Object;Ljava/lang/String;\)V