Add WITH_RUNTIME or WITH_REFLECT to boxWithStdlib testData
This commit is contained in:
committed by
Alexander Udalov
parent
2564a2f91f
commit
22bfc9786a
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// KT-5665
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.lang.reflect.Method
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.lang.reflect.Method
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
annotation class Ann(val v: String = "???")
|
||||
@Ann open class My
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@file:StringHolder("OK")
|
||||
@file:JvmName("FileClass")
|
||||
|
||||
@@ -6,4 +8,4 @@
|
||||
public annotation class StringHolder(val value: String)
|
||||
|
||||
fun box(): String =
|
||||
Class.forName("FileClass").getAnnotation(StringHolder::class.java)?.value ?: "null"
|
||||
Class.forName("FileClass").getAnnotation(StringHolder::class.java)?.value ?: "null"
|
||||
|
||||
Vendored
+2
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b, Foo.bool, Foo.c, Foo.str) class MyClass
|
||||
|
||||
fun box(): String {
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Ann(i, s, f, d, l, b, bool, c, str) class MyClass
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
annotation class A
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@@ -16,4 +18,4 @@ fun box(): String {
|
||||
assert(items[0] is A) { "Expected: [A()], got ${items.asList()}" }
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Ann(A.B.i) class MyClass
|
||||
|
||||
fun box(): String {
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val b: Byte,
|
||||
|
||||
Vendored
+2
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Ann(i) class MyClass
|
||||
|
||||
fun box(): String {
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@kotlin.internal.LowPriorityInOverloadResolution
|
||||
fun foo(i: Int) = 1
|
||||
@@ -14,4 +16,4 @@ fun box(): String {
|
||||
if (foo(1) != 2) return "fail1"
|
||||
if (bar(null) != 3) return "fail2"
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(vararg val p: Int)
|
||||
|
||||
@@ -45,4 +47,4 @@ fun test(klass: Class<*>, expected: String) {
|
||||
if (result != expected) {
|
||||
throw AssertionError("fail: expected = ${expected}, actual = ${result}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun simpleIntArray(): Array<Int> = Array(3) { it }
|
||||
@@ -22,4 +24,3 @@ fun box(): String {
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun box(): String {
|
||||
val x: Array<List<*>> = arrayOf(listOf(1))
|
||||
val y : Array<in List<String>> = x
|
||||
@@ -7,4 +9,4 @@ fun box(): String {
|
||||
y[0] = listOf("OK")
|
||||
|
||||
return x[0][0] as String
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun box(): String {
|
||||
val a = Array<Int>(5, {it})
|
||||
val x = a.indices.iterator()
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun box(): String {
|
||||
val a = CharArray(5)
|
||||
val x = a.indices.iterator()
|
||||
|
||||
+2
-1
@@ -1,2 +1,3 @@
|
||||
fun box() = if(arrayOfNulls<Int>(10).isArrayOf<java.lang.Integer>()) "OK" else "fail"
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun box() = if(arrayOfNulls<Int>(10).isArrayOf<java.lang.Integer>()) "OK" else "fail"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun box() : String {
|
||||
val value = (1 to doubleArrayOf(1.0)).second[0]
|
||||
return if (value == 1.0) "OK" else "fail"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(x : Any): String {
|
||||
return if(x is Array<*> && x.isArrayOf<String>()) (x as Array<String>)[0] else "fail"
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return foo(arrayOf("OK"))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun stringMultiArray(): Array<Array<String>> = Array(3) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun test1() {
|
||||
@@ -25,4 +27,3 @@ fun box(): String {
|
||||
test2()
|
||||
return "OK"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun checkLongAB5E(x: Long) = assertEquals(0xAB5EL, x)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
@@ -30,4 +31,3 @@ fun box() : String {
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
inline fun <R> foo(x : R, block : (R) -> R) : R {
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
|
||||
Vendored
+2
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.jvm.internal.FunctionImpl
|
||||
|
||||
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
fun box(): String =
|
||||
if (listOf("abc", "de", "f").map(String::length.getter) == listOf(3, 2, 1)) "OK" else "Fail"
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// This is a big, ugly, semi-auto generated test.
|
||||
// Use corresponding 'Small' test for debug.
|
||||
|
||||
@@ -247,4 +248,4 @@ fun box(): String {
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun <T> test1() = null as T
|
||||
fun <T> test2(): T {
|
||||
val a : Any? = null
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.util.*
|
||||
|
||||
class Itr : Iterator<String> by ArrayList<String>().iterator()
|
||||
@@ -123,4 +125,4 @@ fun box(): String {
|
||||
asSucceeds("hashMapEntry as MutableMap.MutableEntry") { hashMapEntry as MutableMap.MutableEntry<*, *> }
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// This is a big, ugly, semi-auto generated test.
|
||||
// Use corresponding 'Small' test for debug.
|
||||
|
||||
@@ -174,4 +175,4 @@ fun box(): String {
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_REFLECT
|
||||
|
||||
fun fn0() {}
|
||||
fun fn1(x: Any) {}
|
||||
|
||||
@@ -52,4 +54,4 @@ fun box(): String {
|
||||
assert(afoo is Function1<*, *>) { "afoo is Function1<*, *>" }
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.util.*
|
||||
|
||||
class Itr : Iterator<String> by ArrayList<String>().iterator()
|
||||
@@ -106,4 +108,4 @@ fun box(): String {
|
||||
assert((mlist as Any) !is MutableIterator<*>) { "ML !is MutableIterator" }
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// This is a big, ugly, semi-auto generated test.
|
||||
// Use corresponding 'Small' test for debug.
|
||||
|
||||
@@ -270,4 +271,4 @@ fun box(): String {
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.util.*
|
||||
|
||||
class Itr : Iterator<String> by ArrayList<String>().iterator()
|
||||
@@ -125,4 +127,4 @@ fun box(): String {
|
||||
reifiedAsSucceeds<MutableMap.MutableEntry<*, *>>(hashMapEntry, "reifiedAs<MutableMap.MutableEntry<*, *>>(hashMapEntry)")
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// This is a big, ugly, semi-auto generated test.
|
||||
// Use corresponding 'Small' test for debug.
|
||||
|
||||
@@ -188,4 +189,4 @@ fun box(): String {
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun fn0() {}
|
||||
fun fn1(x: Any) {}
|
||||
|
||||
@@ -33,4 +35,4 @@ fun box(): String {
|
||||
assertReifiedIsNot<Function1<*, *>>(f0, "Function1<*, *>")
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.util.*
|
||||
|
||||
class Itr : Iterator<String> by ArrayList<String>().iterator()
|
||||
@@ -106,4 +108,4 @@ fun box(): String {
|
||||
assert(reifiedIs<MutableMap.MutableEntry<*, *>>(hashMapEntry)) { "reifiedIs<MutableMap.MutableEntry<*, *>>(hashMapEntry)"}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.util.*
|
||||
|
||||
class Itr : Iterator<String> by ArrayList<String>().iterator()
|
||||
@@ -136,4 +138,4 @@ fun box(): String {
|
||||
reifiedSafeAsReturnsNull<MutableMap.MutableEntry<*, *>>(null, "reifiedSafeAs<MutableMap.MutableEntry<*, *>>(null)")
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// This is a big, ugly, semi-auto generated test.
|
||||
// Use corresponding 'Small' test for debug.
|
||||
|
||||
@@ -324,4 +325,4 @@ fun box(): String {
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun fn0() {}
|
||||
fun fn1(x: Any) {}
|
||||
|
||||
@@ -31,4 +33,4 @@ fun box(): String {
|
||||
safeAsReturnsNonNull("f1 as? Function1<*, *>") { f1 as? Function1<*, *> }
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import java.util.*
|
||||
|
||||
class Itr : Iterator<String> by ArrayList<String>().iterator()
|
||||
@@ -134,4 +136,4 @@ fun box(): String {
|
||||
safeAsReturnsNull("mlist as? MutableIterator") { mlist as? MutableIterator<*> }
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun unsupported(): Nothing = throw UnsupportedOperationException()
|
||||
|
||||
class Weird : Iterator<String>, MutableIterable<String>, MutableMap.MutableEntry<String, String> {
|
||||
@@ -135,4 +137,4 @@ fun box(): String {
|
||||
reifiedSafeAsReturnsNonNull<MutableMap.MutableEntry<*, *>>(w, "reified w as? MutableMap.MutableEntry<*, *>")
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun testFun1(str: String): String {
|
||||
val local = str
|
||||
|
||||
@@ -14,4 +16,4 @@ fun box(): String {
|
||||
testFun1("test1") != "test1" -> "Fail #1"
|
||||
else -> "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
import kotlin.reflect.jvm.*
|
||||
// WITH_RUNTIME
|
||||
|
||||
abstract class Itr : Iterator<String>
|
||||
abstract class MItr : MutableIterator<String>
|
||||
@@ -54,4 +54,4 @@ fun box(): String {
|
||||
"java.util.List", "kotlin.jvm.internal.markers.KMutableList"))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
const val z = "OK"
|
||||
|
||||
annotation class A(val value: String = z)
|
||||
@@ -7,4 +9,4 @@ class Test
|
||||
|
||||
fun box(): String {
|
||||
return Test::class.java.getAnnotation(A::class.java).value
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface KInt {
|
||||
|
||||
companion object {
|
||||
@@ -15,4 +17,4 @@ fun box(): String {
|
||||
if (b !== "ba") return "fail 2: 'ba' !== KInt.Companion.b"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun concatNonNulls(strings: List<String?>): String {
|
||||
var result = ""
|
||||
for (str in strings) {
|
||||
@@ -11,4 +13,4 @@ fun box(): String {
|
||||
if (test != "abcdef") return "Failed: test=$test"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+3
-1
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
data class B(val x: Int) {
|
||||
fun equals(other: B): Boolean = false
|
||||
}
|
||||
@@ -29,4 +31,4 @@ fun box(): String {
|
||||
E::class.java.getDeclaredMethod("equals", E::class.java)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+3
-1
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
data class A(val x: Int) {
|
||||
fun hashCode(other: Any): Int = 0
|
||||
}
|
||||
@@ -14,4 +16,4 @@ fun box(): String {
|
||||
B::class.java.getDeclaredMethod("hashCode", B::class.java, Any::class.java)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+3
-1
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
data class A(val x: Int) {
|
||||
fun toString(other: Any): String = ""
|
||||
}
|
||||
@@ -14,4 +16,4 @@ fun box(): String {
|
||||
B::class.java.getDeclaredMethod("toString", B::class.java, Any::class.java)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun foo(): Int {
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A(value: Int = 1)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A(val a: Int = 1,
|
||||
val b: Int = 2,
|
||||
val c: Int = 3,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun box(): String {
|
||||
return if (A().run() == "Aabc") "OK" else "fail"
|
||||
}
|
||||
@@ -11,4 +13,4 @@ public class A {
|
||||
private fun String.show(p: Boolean = false): String = getName() + this
|
||||
|
||||
private fun getName() = "A"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun def(i: Int = 0): Int {
|
||||
return i;
|
||||
|
||||
+1
-1
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// See KT-10107: 'Variable must be initialized' for delegate with private set
|
||||
|
||||
class My {
|
||||
@@ -10,4 +11,3 @@ class My {
|
||||
}
|
||||
|
||||
fun box() = My().delegate
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface T {
|
||||
}
|
||||
|
||||
@@ -9,4 +11,4 @@ fun box(): String {
|
||||
}
|
||||
}
|
||||
return t.foo
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
object X {
|
||||
@@ -19,4 +21,4 @@ class B : A() {
|
||||
}
|
||||
|
||||
fun box(): String =
|
||||
X.O + B().K
|
||||
X.O + B().K
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
open class A<T : Any> {
|
||||
@@ -11,4 +13,4 @@ fun box(): String {
|
||||
B()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// WITH_REFLECT
|
||||
// FULL_JDK
|
||||
|
||||
import java.lang.reflect.InvocationTargetException
|
||||
|
||||
+3
@@ -1,3 +1,6 @@
|
||||
// WITH_REFLECT
|
||||
// TODO: replace with WITH_RUNTIME once KT-11316 is fixed
|
||||
|
||||
import java.util.*
|
||||
import kotlin.reflect.*
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import Game.*
|
||||
|
||||
enum class Game {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
package test
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val b: Byte,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Int,
|
||||
@@ -26,4 +28,4 @@ fun box(): String {
|
||||
if (annotation.p5 != prop5) return "fail 5, expected = ${prop5}, actual = ${annotation.p5}"
|
||||
if (annotation.p6 != prop6) return "fail 6, expected = ${prop6}, actual = ${annotation.p6}"
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
abstract class BaseClass {
|
||||
protected open val menuId: Int = 0
|
||||
|
||||
@@ -15,4 +17,4 @@ public fun box(): String {
|
||||
if (result != ("3" to false)) return "Fail: $result"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Int,
|
||||
@@ -26,4 +28,4 @@ fun box(): String {
|
||||
if (annotation.p5 != 2147483648.toLong()) return "fail 5, expected = ${2147483648}, actual = ${annotation.p5}"
|
||||
if (annotation.p6 != java.lang.Long.MAX_VALUE + 1) return "fail 5, expected = ${java.lang.Long.MAX_VALUE + 1}, actual = ${annotation.p6}"
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Int,
|
||||
@@ -20,4 +22,4 @@ fun box(): String {
|
||||
if (annotation.p4 != 2) return "fail 4, expected = ${2}, actual = ${annotation.p4}"
|
||||
if (annotation.p5 != 2) return "fail 5, expected = ${2}, actual = ${annotation.p5}"
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Int,
|
||||
@@ -20,4 +22,4 @@ fun box(): String {
|
||||
if (annotation.p4 != 2.toLong()) return "fail 4, expected = ${2}, actual = ${annotation.p4}"
|
||||
if (annotation.p5 != 2) return "fail 5, expected = ${2}, actual = ${annotation.p5}"
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Byte,
|
||||
@@ -26,4 +28,4 @@ fun box(): String {
|
||||
if (annotation.p5 != prop5) return "fail 5, expected = ${prop5}, actual = ${annotation.p5}"
|
||||
if (annotation.p6 != prop6) return "fail 6, expected = ${prop6}, actual = ${annotation.p6}"
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Byte,
|
||||
@@ -26,4 +28,4 @@ fun box(): String {
|
||||
if (annotation.p5 != prop5) return "fail 5, expected = ${prop5}, actual = ${annotation.p5}"
|
||||
if (annotation.p6 != prop6) return "fail 6, expected = ${prop6}, actual = ${annotation.p6}"
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Byte,
|
||||
@@ -26,4 +28,4 @@ fun box(): String {
|
||||
if (annotation.p5 != prop5) return "fail 5, expected = ${prop5}, actual = ${annotation.p5}"
|
||||
if (annotation.p6 != prop6) return "fail 6, expected = ${prop6}, actual = ${annotation.p6}"
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Byte,
|
||||
@@ -26,4 +28,4 @@ fun box(): String {
|
||||
if (annotation.p5 != prop5) return "fail 5, expected = ${prop5}, actual = ${annotation.p5}"
|
||||
if (annotation.p6 != prop6) return "fail 6, expected = ${prop6}, actual = ${annotation.p6}"
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Byte,
|
||||
@@ -26,4 +28,4 @@ fun box(): String {
|
||||
if (annotation.p5 != prop5) return "fail 5, expected = ${prop5}, actual = ${annotation.p5}"
|
||||
if (annotation.p6 != prop6) return "fail 6, expected = ${prop6}, actual = ${annotation.p6}"
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Int,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Byte,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(
|
||||
val p1: Byte,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
|
||||
@file:JvmName("XYZ")
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
|
||||
import java.lang.reflect.Modifier
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
|
||||
import java.util.LinkedList
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
|
||||
import java.lang.reflect.Modifier
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
|
||||
package foo
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
|
||||
class C {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
|
||||
package foo
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
|
||||
package collections
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user