Get rid of deprecated annotations in testData
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
annotation class Ann
|
annotation class Ann
|
||||||
|
|
||||||
class Outer {
|
class Outer {
|
||||||
Ann class Nested
|
@Ann class Nested
|
||||||
}
|
}
|
||||||
@@ -26,9 +26,9 @@ enum class Enum
|
|||||||
interface Trait
|
interface Trait
|
||||||
|
|
||||||
// Deprecation
|
// Deprecation
|
||||||
Deprecated("") class DeprecatedClass
|
@Deprecated("") class DeprecatedClass
|
||||||
kotlin.Deprecated("") class DeprecatedFQN
|
@kotlin.Deprecated("") class DeprecatedFQN
|
||||||
kotlin. Deprecated /**/ ("") class DeprecatedFQNSpaces
|
@kotlin. Deprecated /**/ ("") class DeprecatedFQNSpaces
|
||||||
@[Deprecated("")] class DeprecatedWithBrackets
|
@[Deprecated("")] class DeprecatedWithBrackets
|
||||||
@[kotlin.Deprecated("")] class DeprecatedWithBracketsFQN
|
@[kotlin.Deprecated("")] class DeprecatedWithBracketsFQN
|
||||||
@[kotlin
|
@[kotlin
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import kotlin.platform.platformStatic
|
|||||||
|
|
||||||
class PlatformStaticClass {
|
class PlatformStaticClass {
|
||||||
companion object {
|
companion object {
|
||||||
platformStatic
|
@platformStatic
|
||||||
fun inClassObject<T>() {}
|
fun inClassObject<T>() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ class Class {
|
|||||||
fun notNull(a: String): String = ""
|
fun notNull(a: String): String = ""
|
||||||
fun nullable(a: String?): String? = ""
|
fun nullable(a: String?): String? = ""
|
||||||
|
|
||||||
NotNull fun notNullWithNN(): String = ""
|
@NotNull fun notNullWithNN(): String = ""
|
||||||
Nullable fun notNullWithN(): String = ""
|
@Nullable fun notNullWithN(): String = ""
|
||||||
|
|
||||||
Nullable fun nullableWithN(): String? = ""
|
@Nullable fun nullableWithN(): String? = ""
|
||||||
NotNull fun nullableWithNN(): String? = ""
|
@NotNull fun nullableWithNN(): String? = ""
|
||||||
|
|
||||||
val nullableVal: String? = ""
|
val nullableVal: String? = ""
|
||||||
var nullableVar: String? = ""
|
var nullableVar: String? = ""
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ interface Trait {
|
|||||||
fun notNull(a: String): String
|
fun notNull(a: String): String
|
||||||
fun nullable(a: String?): String?
|
fun nullable(a: String?): String?
|
||||||
|
|
||||||
NotNull fun notNullWithNN(): String
|
@NotNull fun notNullWithNN(): String
|
||||||
Nullable fun notNullWithN(): String
|
@Nullable fun notNullWithN(): String
|
||||||
|
|
||||||
Nullable fun nullableWithN(): String?
|
@Nullable fun nullableWithN(): String?
|
||||||
NotNull fun nullableWithNN(): String?
|
@NotNull fun nullableWithNN(): String?
|
||||||
|
|
||||||
val nullableVal: String?
|
val nullableVal: String?
|
||||||
var nullableVar: String?
|
var nullableVar: String?
|
||||||
|
|||||||
+4
-4
@@ -6,11 +6,11 @@ import org.jetbrains.annotations.Nullable
|
|||||||
fun notNull(a: String): String = ""
|
fun notNull(a: String): String = ""
|
||||||
fun nullable(a: String?): String? = ""
|
fun nullable(a: String?): String? = ""
|
||||||
|
|
||||||
NotNull fun notNullWithNN(): String = ""
|
@NotNull fun notNullWithNN(): String = ""
|
||||||
Nullable fun notNullWithN(): String = ""
|
@Nullable fun notNullWithN(): String = ""
|
||||||
|
|
||||||
Nullable fun nullableWithN(): String? = ""
|
@Nullable fun nullableWithN(): String? = ""
|
||||||
NotNull fun nullableWithNN(): String? = ""
|
@NotNull fun nullableWithNN(): String? = ""
|
||||||
|
|
||||||
val nullableVal: String? = ""
|
val nullableVal: String? = ""
|
||||||
var nullableVar: String? = ""
|
var nullableVar: String? = ""
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
annotation class A(val a: Int = 0)
|
annotation class A(val a: Int = 0)
|
||||||
|
|
||||||
A fun test1() = 1
|
@A fun test1() = 1
|
||||||
A(2) fun test2() = 1
|
@A(2) fun test2() = 1
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
if ((test1() + test2()) == 2) {
|
if ((test1() + test2()) == 2) {
|
||||||
|
|||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
JavaAnn class MyClass1
|
@JavaAnn class MyClass1
|
||||||
JavaAnn() class MyClass2
|
@JavaAnn() class MyClass2
|
||||||
JavaAnn("asd") class MyClass3
|
@JavaAnn("asd") class MyClass3
|
||||||
JavaAnn(*array()) class MyClass4
|
@JavaAnn(*array()) class MyClass4
|
||||||
|
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
JavaAnn class MyClass1
|
@JavaAnn class MyClass1
|
||||||
JavaAnn() class MyClass2
|
@JavaAnn() class MyClass2
|
||||||
JavaAnn("asd") class MyClass3
|
@JavaAnn("asd") class MyClass3
|
||||||
JavaAnn(*array()) class MyClass4
|
@JavaAnn(*array()) class MyClass4
|
||||||
|
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
JavaAnn("value") class MyClass
|
@JavaAnn("value") class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val ann = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>())
|
val ann = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>())
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
JavaAnn class MyClass
|
@JavaAnn class MyClass
|
||||||
JavaAnn2 class MyClass2
|
@JavaAnn2 class MyClass2
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val ann = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>())
|
val ann = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>())
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b) class MyClass
|
@Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val ann = javaClass<MyClass>().getAnnotation(javaClass<Ann>())
|
val ann = javaClass<MyClass>().getAnnotation(javaClass<Ann>())
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b, Foo.bool, Foo.c, Foo.str, Foo.charAsInt, Foo.intAsChar) class MyClass
|
@Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b, Foo.bool, Foo.c, Foo.str, Foo.charAsInt, Foo.intAsChar) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val ann = javaClass<MyClass>().getAnnotation(javaClass<Ann>())
|
val ann = javaClass<MyClass>().getAnnotation(javaClass<Ann>())
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b, Foo.c) class MyClass
|
@Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b, Foo.c) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val ann = javaClass<MyClass>().getAnnotation(javaClass<Ann>())
|
val ann = javaClass<MyClass>().getAnnotation(javaClass<Ann>())
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
class O
|
class O
|
||||||
class K
|
class K
|
||||||
|
|
||||||
JavaAnn(args = array(O::class, K::class)) class MyClass
|
@JavaAnn(args = array(O::class, K::class)) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val args = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>()).args()
|
val args = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>()).args()
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
class OK
|
class OK
|
||||||
|
|
||||||
JavaAnn(OK::class) class MyClass
|
@JavaAnn(OK::class) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val ann = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>())
|
val ann = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>())
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
class O
|
class O
|
||||||
class K
|
class K
|
||||||
|
|
||||||
JavaAnn(O::class, K::class) class MyClass
|
@JavaAnn(O::class, K::class) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val args = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>()).value
|
val args = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>()).value
|
||||||
|
|||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
JavaAnn class MyClass1
|
@JavaAnn class MyClass1
|
||||||
JavaAnn() class MyClass2
|
@JavaAnn() class MyClass2
|
||||||
JavaAnn("asd") class MyClass3
|
@JavaAnn("asd") class MyClass3
|
||||||
JavaAnn(*array()) class MyClass4
|
@JavaAnn(*array()) class MyClass4
|
||||||
|
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
JavaAnn class MyClass1
|
@JavaAnn class MyClass1
|
||||||
JavaAnn() class MyClass2
|
@JavaAnn() class MyClass2
|
||||||
JavaAnn("asd") class MyClass3
|
@JavaAnn("asd") class MyClass3
|
||||||
JavaAnn(*array()) class MyClass4
|
@JavaAnn(*array()) class MyClass4
|
||||||
|
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
JavaAnn("value") class MyClass
|
@JavaAnn("value") class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val ann = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>())
|
val ann = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>())
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
JavaAnn class MyClass
|
@JavaAnn class MyClass
|
||||||
JavaAnn2 class MyClass2
|
@JavaAnn2 class MyClass2
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val ann = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>())
|
val ann = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>())
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
class O
|
class O
|
||||||
class K
|
class K
|
||||||
|
|
||||||
JavaAnn(args = array(O::class, K::class)) class MyClass
|
@JavaAnn(args = array(O::class, K::class)) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val args = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>()).args()
|
val args = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>()).args()
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
class OK
|
class OK
|
||||||
|
|
||||||
JavaAnn(OK::class) class MyClass
|
@JavaAnn(OK::class) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val ann = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>())
|
val ann = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>())
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
class O
|
class O
|
||||||
class K
|
class K
|
||||||
|
|
||||||
JavaAnn(O::class, K::class) class MyClass
|
@JavaAnn(O::class, K::class) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val args = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>()).value()
|
val args = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>()).value()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import java.lang.annotation.*
|
import java.lang.annotation.*
|
||||||
|
|
||||||
Foo class Bar
|
@Foo class Bar
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
Bar()
|
Bar()
|
||||||
|
|||||||
+2
-2
@@ -8,14 +8,14 @@ class A {
|
|||||||
companion object {
|
companion object {
|
||||||
val b: String = "OK"
|
val b: String = "OK"
|
||||||
|
|
||||||
JvmStatic testAnnotation fun test1() = b
|
@JvmStatic @testAnnotation fun test1() = b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
object B {
|
object B {
|
||||||
val b: String = "OK"
|
val b: String = "OK"
|
||||||
|
|
||||||
JvmStatic testAnnotation fun test1() = b
|
@JvmStatic @testAnnotation fun test1() = b
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
+4
-4
@@ -5,13 +5,13 @@ class A {
|
|||||||
companion object {
|
companion object {
|
||||||
val b: String = "OK"
|
val b: String = "OK"
|
||||||
|
|
||||||
JvmStatic val c: String = "OK"
|
@JvmStatic val c: String = "OK"
|
||||||
|
|
||||||
JvmStatic fun test1() = b
|
@JvmStatic fun test1() = b
|
||||||
|
|
||||||
JvmStatic fun test2() = b
|
@JvmStatic fun test2() = b
|
||||||
|
|
||||||
JvmStatic fun String.test3() = this + b
|
@JvmStatic fun String.test3() = this + b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -5,9 +5,9 @@ enum class A {
|
|||||||
companion object {
|
companion object {
|
||||||
val foo: String = "OK"
|
val foo: String = "OK"
|
||||||
|
|
||||||
JvmStatic val bar: String = "OK"
|
@JvmStatic val bar: String = "OK"
|
||||||
|
|
||||||
JvmStatic fun baz() = foo
|
@JvmStatic fun baz() = foo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -4,13 +4,13 @@ object A {
|
|||||||
|
|
||||||
val b: String = "OK"
|
val b: String = "OK"
|
||||||
|
|
||||||
JvmStatic val c: String = "OK"
|
@JvmStatic val c: String = "OK"
|
||||||
|
|
||||||
JvmStatic fun test1() = b
|
@JvmStatic fun test1() = b
|
||||||
|
|
||||||
JvmStatic fun test2() = b
|
@JvmStatic fun test2() = b
|
||||||
|
|
||||||
JvmStatic fun String.test3() = this + b
|
@JvmStatic fun String.test3() = this + b
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
+2
-2
@@ -3,9 +3,9 @@ import kotlin.test.assertEquals
|
|||||||
@Retention(AnnotationRetention.RUNTIME)
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
annotation class Ann(val x: Int)
|
annotation class Ann(val x: Int)
|
||||||
class A {
|
class A {
|
||||||
Ann(1) fun foo(x: Int, y: Int = 2, z: Int) {}
|
@Ann(1) fun foo(x: Int, y: Int = 2, z: Int) {}
|
||||||
|
|
||||||
Ann(1) constructor(x: Int, y: Int = 2, z: Int)
|
@Ann(1) constructor(x: Int, y: Int = 2, z: Int)
|
||||||
}
|
}
|
||||||
|
|
||||||
class B @Ann(1) constructor(x: Int, y: Int = 2, z: Int) {}
|
class B @Ann(1) constructor(x: Int, y: Int = 2, z: Int) {}
|
||||||
|
|||||||
+1
-1
@@ -33,4 +33,4 @@ enum class MyEnum {
|
|||||||
|
|
||||||
class A
|
class A
|
||||||
|
|
||||||
Ann class MyClass
|
@Ann class MyClass
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b, Foo.bool, Foo.c, Foo.str) class MyClass
|
@Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b, Foo.bool, Foo.c, Foo.str) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val ann = javaClass<MyClass>().getAnnotation(javaClass<Ann>())
|
val ann = javaClass<MyClass>().getAnnotation(javaClass<Ann>())
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
Ann(i, s, f, d, l, b, bool, c, str) class MyClass
|
@Ann(i, s, f, d, l, b, bool, c, str) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val ann = javaClass<MyClass>().getAnnotation(javaClass<Ann>())
|
val ann = javaClass<MyClass>().getAnnotation(javaClass<Ann>())
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
Ann(A.B.i) class MyClass
|
@Ann(A.B.i) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val ann = javaClass<MyClass>().getAnnotation(javaClass<Ann>())
|
val ann = javaClass<MyClass>().getAnnotation(javaClass<Ann>())
|
||||||
|
|||||||
+1
-1
@@ -24,4 +24,4 @@ fun box(): String {
|
|||||||
return "OK"
|
return "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
Ann(1, 1, 1, 1.0.toFloat(), 1.0, 1, 'c', true) class MyClass
|
@Ann(1, 1, 1, 1.0.toFloat(), 1.0, 1, 'c', true) class MyClass
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
Ann(i) class MyClass
|
@Ann(i) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val ann = javaClass<MyClass>().getAnnotation(javaClass<Ann>())
|
val ann = javaClass<MyClass>().getAnnotation(javaClass<Ann>())
|
||||||
|
|||||||
+10
-10
@@ -1,19 +1,19 @@
|
|||||||
@Retention(AnnotationRetention.RUNTIME)
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
annotation class Ann(vararg val p: Int)
|
annotation class Ann(vararg val p: Int)
|
||||||
|
|
||||||
Ann() class MyClass1
|
@Ann() class MyClass1
|
||||||
Ann(1) class MyClass2
|
@Ann(1) class MyClass2
|
||||||
Ann(1, 2) class MyClass3
|
@Ann(1, 2) class MyClass3
|
||||||
|
|
||||||
Ann(*intArray()) class MyClass4
|
@Ann(*intArray()) class MyClass4
|
||||||
Ann(*intArray(1)) class MyClass5
|
@Ann(*intArray(1)) class MyClass5
|
||||||
Ann(*intArray(1, 2)) class MyClass6
|
@Ann(*intArray(1, 2)) class MyClass6
|
||||||
|
|
||||||
Ann(p = 1) class MyClass7
|
@Ann(p = 1) class MyClass7
|
||||||
|
|
||||||
Ann(p = *intArray()) class MyClass8
|
@Ann(p = *intArray()) class MyClass8
|
||||||
Ann(p = *intArray(1)) class MyClass9
|
@Ann(p = *intArray(1)) class MyClass9
|
||||||
Ann(p = *intArray(1, 2)) class MyClass10
|
@Ann(p = *intArray(1, 2)) class MyClass10
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
test(javaClass<MyClass1>(), "")
|
test(javaClass<MyClass1>(), "")
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package test
|
|||||||
@Retention(AnnotationRetention.RUNTIME)
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
annotation class Ann(val c1: Int)
|
annotation class Ann(val c1: Int)
|
||||||
|
|
||||||
Ann('a' - 'a') class MyClass
|
@Ann('a' - 'a') class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ annotation class Ann(
|
|||||||
val l: Long
|
val l: Long
|
||||||
)
|
)
|
||||||
|
|
||||||
Ann(1 / 1, 1 / 1, 1 / 1, 1 / 1) class MyClass
|
@Ann(1 / 1, 1 / 1, 1 / 1, 1 / 1) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ annotation class Ann(
|
|||||||
val p5: Int
|
val p5: Int
|
||||||
)
|
)
|
||||||
|
|
||||||
Ann(1 plus 1, 1 minus 1, 1 times 1, 1 div 1, 1 mod 1) class MyClass
|
@Ann(1 plus 1, 1 minus 1, 1 times 1, 1 div 1, 1 mod 1) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ val prop4: Int = 1 shl 1
|
|||||||
val prop5: Int = 1 shr 1
|
val prop5: Int = 1 shr 1
|
||||||
val prop6: Int = 1 ushr 1
|
val prop6: Int = 1 ushr 1
|
||||||
|
|
||||||
Ann(1 or 1, 1 and 1, 1 xor 1, 1 shl 1, 1 shr 1, 1 ushr 1) class MyClass
|
@Ann(1 or 1, 1 and 1, 1 xor 1, 1 shl 1, 1 shr 1, 1 ushr 1) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ annotation class Ann(
|
|||||||
val p6: Long
|
val p6: Long
|
||||||
)
|
)
|
||||||
|
|
||||||
Ann(
|
@Ann(
|
||||||
p1 = java.lang.Byte.MAX_VALUE + 1,
|
p1 = java.lang.Byte.MAX_VALUE + 1,
|
||||||
p2 = java.lang.Short.MAX_VALUE + 1,
|
p2 = java.lang.Short.MAX_VALUE + 1,
|
||||||
p3 = java.lang.Integer.MAX_VALUE + 1,
|
p3 = java.lang.Integer.MAX_VALUE + 1,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ annotation class Ann(
|
|||||||
val p5: Int
|
val p5: Int
|
||||||
)
|
)
|
||||||
|
|
||||||
Ann(
|
@Ann(
|
||||||
p1 = java.lang.Byte.MAX_VALUE + 1,
|
p1 = java.lang.Byte.MAX_VALUE + 1,
|
||||||
p2 = 1 + 1,
|
p2 = 1 + 1,
|
||||||
p4 = 1 + 1,
|
p4 = 1 + 1,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ annotation class Ann(
|
|||||||
val p5: Int
|
val p5: Int
|
||||||
)
|
)
|
||||||
|
|
||||||
Ann(
|
@Ann(
|
||||||
p1 = java.lang.Integer.MAX_VALUE + 1,
|
p1 = java.lang.Integer.MAX_VALUE + 1,
|
||||||
p2 = 1 + 1,
|
p2 = 1 + 1,
|
||||||
p4 = 1 + 1,
|
p4 = 1 + 1,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ val prop4: Long = 1 * 1
|
|||||||
val prop5: Double = 1.0 * 1.0
|
val prop5: Double = 1.0 * 1.0
|
||||||
val prop6: Float = 1.0.toFloat() * 1.0.toFloat()
|
val prop6: Float = 1.0.toFloat() * 1.0.toFloat()
|
||||||
|
|
||||||
Ann(1 * 1, 1 * 1, 1 * 1, 1 * 1, 1.0 * 1.0, 1.0.toFloat() * 1.0.toFloat()) class MyClass
|
@Ann(1 * 1, 1 * 1, 1 * 1, 1 * 1, 1.0 * 1.0, 1.0.toFloat() * 1.0.toFloat()) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ val prop4: Long = 1 - 1
|
|||||||
val prop5: Double = 1.0 - 1.0
|
val prop5: Double = 1.0 - 1.0
|
||||||
val prop6: Float = 1.0.toFloat() - 1.0.toFloat()
|
val prop6: Float = 1.0.toFloat() - 1.0.toFloat()
|
||||||
|
|
||||||
Ann(1 - 1, 1 - 1, 1 - 1, 1 - 1, 1.0 - 1.0, 1.0.toFloat() - 1.0.toFloat()) class MyClass
|
@Ann(1 - 1, 1 - 1, 1 - 1, 1 - 1, 1.0 - 1.0, 1.0.toFloat() - 1.0.toFloat()) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ val prop4: Long = 1 % 1
|
|||||||
val prop5: Double = 1.0 % 1.0
|
val prop5: Double = 1.0 % 1.0
|
||||||
val prop6: Float = 1.0.toFloat() % 1.0.toFloat()
|
val prop6: Float = 1.0.toFloat() % 1.0.toFloat()
|
||||||
|
|
||||||
Ann(1 % 1, 1 % 1, 1 % 1, 1 % 1, 1.0 % 1.0, 1.0.toFloat() % 1.0.toFloat()) class MyClass
|
@Ann(1 % 1, 1 % 1, 1 % 1, 1 % 1, 1.0 % 1.0, 1.0.toFloat() % 1.0.toFloat()) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ val prop4: Long = (1 + 2) * 2
|
|||||||
val prop5: Double = (1.0 + 2) * 2
|
val prop5: Double = (1.0 + 2) * 2
|
||||||
val prop6: Float = (1.toFloat() + 2) * 2
|
val prop6: Float = (1.toFloat() + 2) * 2
|
||||||
|
|
||||||
Ann((1 + 2) * 2, (1 + 2) * 2, (1 + 2) * 2, (1 + 2) * 2, (1.0 + 2) * 2, (1.toFloat() + 2) * 2) class MyClass
|
@Ann((1 + 2) * 2, (1 + 2) * 2, (1 + 2) * 2, (1 + 2) * 2, (1.0 + 2) * 2, (1.toFloat() + 2) * 2) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ val prop4: Long = 1 + 1
|
|||||||
val prop5: Double = 1.0 + 1.0
|
val prop5: Double = 1.0 + 1.0
|
||||||
val prop6: Float = 1.0.toFloat() + 1.0.toFloat()
|
val prop6: Float = 1.0.toFloat() + 1.0.toFloat()
|
||||||
|
|
||||||
Ann(1 + 1, 1 + 1, 1 + 1, 1 + 1, 1.0 + 1.0, 1.0.toFloat() + 1.0.toFloat()) class MyClass
|
@Ann(1 + 1, 1 + 1, 1 + 1, 1 + 1, 1.0 + 1.0, 1.0.toFloat() + 1.0.toFloat()) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ val prop3: Int = 1.times(1)
|
|||||||
val prop4: Int = 1.div(1)
|
val prop4: Int = 1.div(1)
|
||||||
val prop5: Int = 1.mod(1)
|
val prop5: Int = 1.mod(1)
|
||||||
|
|
||||||
Ann(prop1, prop2, prop3, prop4, prop5) class MyClass
|
@Ann(prop1, prop2, prop3, prop4, prop5) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ val prop4: Long = -1
|
|||||||
val prop5: Double = -1.0
|
val prop5: Double = -1.0
|
||||||
val prop6: Float = -1.0.toFloat()
|
val prop6: Float = -1.0.toFloat()
|
||||||
|
|
||||||
Ann(prop1, prop2, prop3, prop4, prop5, prop6) class MyClass
|
@Ann(prop1, prop2, prop3, prop4, prop5, prop6) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ val prop4: Long = +1
|
|||||||
val prop5: Double = +1.0
|
val prop5: Double = +1.0
|
||||||
val prop6: Float = +1.0.toFloat()
|
val prop6: Float = +1.0.toFloat()
|
||||||
|
|
||||||
Ann(prop1, prop2, prop3, prop4, prop5, prop6) class MyClass
|
@Ann(prop1, prop2, prop3, prop4, prop5, prop6) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
val annotation = javaClass<MyClass>().getAnnotation(javaClass<Ann>())!!
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import kotlin.platform.*
|
|||||||
object ObjWithNative {
|
object ObjWithNative {
|
||||||
external fun foo(x: Int = 1): Double
|
external fun foo(x: Int = 1): Double
|
||||||
|
|
||||||
platformStatic external fun bar(l: Long, s: String = ""): Double
|
@platformStatic external fun bar(l: Long, s: String = ""): Double
|
||||||
}
|
}
|
||||||
|
|
||||||
external fun topLevel(x: Int = 1): Double
|
external fun topLevel(x: Int = 1): Double
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import kotlin.platform.*
|
|||||||
|
|
||||||
class C {
|
class C {
|
||||||
companion object {
|
companion object {
|
||||||
private platformStatic external fun foo()
|
private @platformStatic external fun foo()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun bar() {
|
fun bar() {
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import kotlin.platform.*
|
|||||||
|
|
||||||
class WithNative {
|
class WithNative {
|
||||||
companion object {
|
companion object {
|
||||||
platformStatic external fun bar(l: Long, s: String): Double
|
@platformStatic external fun bar(l: Long, s: String): Double
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
object ObjWithNative {
|
object ObjWithNative {
|
||||||
platformStatic external fun bar(l: Long, s: String): Double
|
@platformStatic external fun bar(l: Long, s: String): Double
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ object A {
|
|||||||
|
|
||||||
val b: String = "OK"
|
val b: String = "OK"
|
||||||
|
|
||||||
platformStatic var c: String = "Fail"
|
@platformStatic var c: String = "Fail"
|
||||||
|
|
||||||
platformStatic fun test1() : String {
|
@platformStatic fun test1() : String {
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
platformStatic fun test2() : String {
|
@platformStatic fun test2() : String {
|
||||||
return test1()
|
return test1()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -18,11 +18,11 @@ object A {
|
|||||||
return "1".test5()
|
return "1".test5()
|
||||||
}
|
}
|
||||||
|
|
||||||
platformStatic fun test4(): String {
|
@platformStatic fun test4(): String {
|
||||||
return "1".test5()
|
return "1".test5()
|
||||||
}
|
}
|
||||||
|
|
||||||
platformStatic fun String.test5() : String {
|
@platformStatic fun String.test5() : String {
|
||||||
return this + b
|
return this + b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ object A {
|
|||||||
|
|
||||||
val b: String = "OK"
|
val b: String = "OK"
|
||||||
|
|
||||||
platformStatic val c: String = "OK"
|
@platformStatic val c: String = "OK"
|
||||||
|
|
||||||
platformStatic fun test1() : String {
|
@platformStatic fun test1() : String {
|
||||||
return {b}()
|
return {b}()
|
||||||
}
|
}
|
||||||
|
|
||||||
platformStatic fun test2() : String {
|
@platformStatic fun test2() : String {
|
||||||
return {test1()}()
|
return {test1()}()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -18,11 +18,11 @@ object A {
|
|||||||
return {"1".test5()}()
|
return {"1".test5()}()
|
||||||
}
|
}
|
||||||
|
|
||||||
platformStatic fun test4(): String {
|
@platformStatic fun test4(): String {
|
||||||
return {"1".test5()}()
|
return {"1".test5()}()
|
||||||
}
|
}
|
||||||
|
|
||||||
platformStatic fun String.test5() : String {
|
@platformStatic fun String.test5() : String {
|
||||||
return {this + b}()
|
return {this + b}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ object A {
|
|||||||
v += B(1000)
|
v += B(1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
platformStatic fun B.plusAssign(b: B) {
|
@platformStatic fun B.plusAssign(b: B) {
|
||||||
this.s += b.s
|
this.s += b.s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import kotlin.platform.platformStatic
|
|||||||
|
|
||||||
object A {
|
object A {
|
||||||
|
|
||||||
platformStatic fun test(b: String = "OK") : String {
|
@platformStatic fun test(b: String = "OK") : String {
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import kotlin.platform.platformStatic
|
|||||||
|
|
||||||
object AX {
|
object AX {
|
||||||
|
|
||||||
platformStatic val c: String = "OK"
|
@platformStatic val c: String = "OK"
|
||||||
|
|
||||||
platformStatic fun aStatic(): String {
|
@platformStatic fun aStatic(): String {
|
||||||
return AX.b()
|
return AX.b()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ object AX {
|
|||||||
return AX.b()
|
return AX.b()
|
||||||
}
|
}
|
||||||
|
|
||||||
platformStatic fun b(): String {
|
@platformStatic fun b(): String {
|
||||||
return "OK"
|
return "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ fun getA(): A {
|
|||||||
}
|
}
|
||||||
|
|
||||||
object A {
|
object A {
|
||||||
platformStatic fun a(): String {
|
@platformStatic fun a(): String {
|
||||||
return holder
|
return holder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import kotlin.platform.platformStatic
|
|||||||
|
|
||||||
object A {
|
object A {
|
||||||
|
|
||||||
platformStatic inline fun test(b: String = "OK") : String {
|
@platformStatic inline fun test(b: String = "OK") : String {
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import kotlin.platform.platformStatic
|
|||||||
|
|
||||||
object A {
|
object A {
|
||||||
|
|
||||||
platformStatic var a: Int = 1
|
@platformStatic var a: Int = 1
|
||||||
|
|
||||||
var b: Int = 1
|
var b: Int = 1
|
||||||
@platformStatic get
|
@platformStatic get
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import kotlin.platform.platformStatic
|
|||||||
|
|
||||||
object A {
|
object A {
|
||||||
|
|
||||||
platformStatic var a: Int = 1
|
@platformStatic var a: Int = 1
|
||||||
|
|
||||||
var b: Int = 1
|
var b: Int = 1
|
||||||
@platformStatic get
|
@platformStatic get
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import kotlin.platform.platformStatic
|
|||||||
|
|
||||||
object A {
|
object A {
|
||||||
|
|
||||||
private platformStatic fun a(): String {
|
private @platformStatic fun a(): String {
|
||||||
return "OK"
|
return "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ fun getA(): A {
|
|||||||
|
|
||||||
object A {
|
object A {
|
||||||
|
|
||||||
platformStatic var a: Int = 1
|
@platformStatic var a: Int = 1
|
||||||
|
|
||||||
var b: Int = 1
|
var b: Int = 1
|
||||||
@platformStatic get
|
@platformStatic get
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
import kotlin.platform.platformStatic
|
import kotlin.platform.platformStatic
|
||||||
|
|
||||||
object X {
|
object X {
|
||||||
platformStatic val x = "OK"
|
@platformStatic val x = "OK"
|
||||||
|
|
||||||
fun fn(value : String = x): String = value
|
fun fn(value : String = x): String = value
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ object A {
|
|||||||
|
|
||||||
val b: String = "OK"
|
val b: String = "OK"
|
||||||
|
|
||||||
platformStatic val c: String = "OK"
|
@platformStatic val c: String = "OK"
|
||||||
|
|
||||||
platformStatic fun test1() : String {
|
@platformStatic fun test1() : String {
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
platformStatic fun test2() : String {
|
@platformStatic fun test2() : String {
|
||||||
return test1()
|
return test1()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -18,11 +18,11 @@ object A {
|
|||||||
return "1".test5()
|
return "1".test5()
|
||||||
}
|
}
|
||||||
|
|
||||||
platformStatic fun test4(): String {
|
@platformStatic fun test4(): String {
|
||||||
return "1".test5()
|
return "1".test5()
|
||||||
}
|
}
|
||||||
|
|
||||||
platformStatic fun String.test5() : String {
|
@platformStatic fun String.test5() : String {
|
||||||
return this + b
|
return this + b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ import kotlin.platform.*
|
|||||||
|
|
||||||
class C {
|
class C {
|
||||||
companion object {
|
companion object {
|
||||||
private platformStatic fun foo(): String {
|
private @platformStatic fun foo(): String {
|
||||||
return "OK"
|
return "OK"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+2
-2
@@ -1,13 +1,13 @@
|
|||||||
import kotlin.reflect.*
|
import kotlin.reflect.*
|
||||||
import kotlin.reflect.jvm.*
|
import kotlin.reflect.jvm.*
|
||||||
import kotlin.platform.platformStatic as static
|
import kotlin.jvm.JvmStatic as static
|
||||||
|
|
||||||
class A {
|
class A {
|
||||||
private var foo: String = ""
|
private var foo: String = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
object O {
|
object O {
|
||||||
private static var bar: String = ""
|
private @static var bar: String = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
class CounterTest<T>(t: T) {
|
class CounterTest<T>(t: T) {
|
||||||
|
|||||||
+3
-3
@@ -1,4 +1,4 @@
|
|||||||
import kotlin.platform.platformStatic as static
|
import kotlin.jvm.JvmStatic as static
|
||||||
import kotlin.reflect.jvm.isAccessible
|
import kotlin.reflect.jvm.isAccessible
|
||||||
import kotlin.reflect.KCallable
|
import kotlin.reflect.KCallable
|
||||||
|
|
||||||
@@ -9,9 +9,9 @@ class A(private var bar: String = "") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
object O {
|
object O {
|
||||||
private static var baz: String = ""
|
private @static var baz: String = ""
|
||||||
|
|
||||||
static fun getBaz() = O::baz.apply { isAccessible = true }
|
@static fun getBaz() = O::baz.apply { isAccessible = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun check(callable: KCallable<*>, vararg args: Any?) {
|
fun check(callable: KCallable<*>, vararg args: Any?) {
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import kotlin.platform.platformStatic as static
|
import kotlin.jvm.JvmStatic as static
|
||||||
|
|
||||||
object Obj {
|
object Obj {
|
||||||
static fun foo() {}
|
@static fun foo() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
class C {
|
class C {
|
||||||
companion object {
|
companion object {
|
||||||
static fun bar() {}
|
@static fun bar() {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+4
-4
@@ -1,9 +1,9 @@
|
|||||||
import kotlin.platform.platformStatic as static
|
import kotlin.jvm.JvmStatic as static
|
||||||
|
|
||||||
object Obj {
|
object Obj {
|
||||||
static fun foo(s: String) {}
|
@static fun foo(s: String) {}
|
||||||
static fun bar() {}
|
@static fun bar() {}
|
||||||
static fun sly(obj: Obj) {}
|
@static fun sly(obj: Obj) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class A {
|
|||||||
}
|
}
|
||||||
|
|
||||||
object O {
|
object O {
|
||||||
kotlin.platform.platformStatic fun baz() {}
|
@kotlin.platform.platformStatic fun baz() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun nullableUnit(unit: Boolean): Unit? = if (unit) Unit else null
|
fun nullableUnit(unit: Boolean): Unit? = if (unit) Unit else null
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
import kotlin.platform.platformStatic as static
|
import kotlin.jvm.JvmStatic as static
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
|
|
||||||
object Obj {
|
object Obj {
|
||||||
static fun foo(a: String, b: String = "b") = a + b
|
@static fun foo(a: String, b: String = "b") = a + b
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ annotation class Ann(val args: Array<KClass<*>>)
|
|||||||
class O
|
class O
|
||||||
class K
|
class K
|
||||||
|
|
||||||
Ann(array(O::class, K::class)) class MyClass
|
@Ann(array(O::class, K::class)) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val args = javaClass<MyClass>().getAnnotation(javaClass<Ann>()).args
|
val args = javaClass<MyClass>().getAnnotation(javaClass<Ann>()).args
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ annotation class Ann(val arg: KClass<*>)
|
|||||||
|
|
||||||
class OK
|
class OK
|
||||||
|
|
||||||
Ann(OK::class) class MyClass
|
@Ann(OK::class) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val argName = javaClass<MyClass>().getAnnotation(javaClass<Ann>()).arg.simpleName ?: "fail 1"
|
val argName = javaClass<MyClass>().getAnnotation(javaClass<Ann>()).arg.simpleName ?: "fail 1"
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ annotation class Ann(vararg val args: KClass<*>)
|
|||||||
class O
|
class O
|
||||||
class K
|
class K
|
||||||
|
|
||||||
Ann(O::class, K::class) class MyClass
|
@Ann(O::class, K::class) class MyClass
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val args = javaClass<MyClass>().getAnnotation(javaClass<Ann>()).args
|
val args = javaClass<MyClass>().getAnnotation(javaClass<Ann>()).args
|
||||||
|
|||||||
compiler/testData/codegen/boxWithStdlib/reflection/mapping/platformStatic/companionObjectFunction.kt
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import kotlin.platform.platformStatic as static
|
import kotlin.jvm.JvmStatic as static
|
||||||
import kotlin.reflect.jvm.*
|
import kotlin.reflect.jvm.*
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
import kotlin.test.failsWith
|
import kotlin.test.failsWith
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import kotlin.platform.platformStatic as static
|
import kotlin.jvm.JvmStatic as static
|
||||||
import kotlin.reflect.jvm.*
|
import kotlin.reflect.jvm.*
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
import kotlin.platform.platformStatic as static
|
import kotlin.jvm.JvmStatic as static
|
||||||
import kotlin.reflect.jvm.javaType
|
import kotlin.reflect.jvm.javaType
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ class A {
|
|||||||
}
|
}
|
||||||
|
|
||||||
object O {
|
object O {
|
||||||
static fun bar(a: A): String = ""
|
@static fun bar(a: A): String = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
|
|
||||||
import java.lang.reflect.ParameterizedType
|
import java.lang.reflect.ParameterizedType
|
||||||
import kotlin.platform.platformStatic as static
|
import kotlin.jvm.JvmStatic as static
|
||||||
import kotlin.reflect.*
|
import kotlin.reflect.*
|
||||||
import kotlin.reflect.jvm.javaType
|
import kotlin.reflect.jvm.javaType
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
@@ -9,7 +9,7 @@ import kotlin.test.assertEquals
|
|||||||
class A(private var foo: List<String>)
|
class A(private var foo: List<String>)
|
||||||
|
|
||||||
object O {
|
object O {
|
||||||
private static var bar: List<String> = listOf()
|
private @static var bar: List<String> = listOf()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun topLevel(): List<String> = listOf()
|
fun topLevel(): List<String> = listOf()
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
import kotlin.platform.platformStatic as static
|
import kotlin.jvm.JvmStatic as static
|
||||||
import kotlin.reflect.KMutableProperty
|
import kotlin.reflect.KMutableProperty
|
||||||
import kotlin.reflect.jvm.javaType
|
import kotlin.reflect.jvm.javaType
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
@@ -6,7 +6,7 @@ import kotlin.test.assertEquals
|
|||||||
class A(private var foo: String)
|
class A(private var foo: String)
|
||||||
|
|
||||||
object O {
|
object O {
|
||||||
private static var bar: String = ""
|
private @static var bar: String = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
Vendored
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
import kotlin.reflect.*
|
import kotlin.reflect.*
|
||||||
import kotlin.reflect.jvm.*
|
import kotlin.reflect.jvm.*
|
||||||
import kotlin.platform.platformStatic as static
|
import kotlin.jvm.JvmStatic as static
|
||||||
|
|
||||||
object Obj {
|
object Obj {
|
||||||
private static var result: String = "Fail"
|
private @static var result: String = "Fail"
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import java.lang.annotation.Annotation
|
|||||||
annotation class foo(val name : String)
|
annotation class foo(val name : String)
|
||||||
|
|
||||||
class Test() {
|
class Test() {
|
||||||
foo("OK") fun hello(input : String) {
|
@foo("OK") fun hello(input : String) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import kotlin.InlineOption.*
|
import kotlin.InlineOption.*
|
||||||
|
|
||||||
inline fun<reified T> createArray(n: Int, inlineOptions(ONLY_LOCAL_RETURN) block: () -> T): Array<T> {
|
inline fun<reified T> createArray(n: Int, crossinline block: () -> T): Array<T> {
|
||||||
return Array<T>(n) { block() }
|
return Array<T>(n) { block() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import kotlin.InlineOption.*
|
import kotlin.InlineOption.*
|
||||||
|
|
||||||
inline fun<reified T> createArray(n: Int, inlineOptions(ONLY_LOCAL_RETURN) block: () -> T): Array<T> {
|
inline fun<reified T> createArray(n: Int, crossinline block: () -> T): Array<T> {
|
||||||
return Array<T>(n) { block() }
|
return Array<T>(n) { block() }
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fun<T1, T2, T3, T4, T5, T6, reified R> recursive(
|
inline fun<T1, T2, T3, T4, T5, T6, reified R> recursive(
|
||||||
inlineOptions(ONLY_LOCAL_RETURN) block: () -> R
|
crossinline block: () -> R
|
||||||
): Array<R> {
|
): Array<R> {
|
||||||
return createArray(5) { block() }
|
return createArray(5) { block() }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import kotlin.InlineOption.*
|
import kotlin.InlineOption.*
|
||||||
|
|
||||||
inline fun<reified T1, reified T2> createArray(n: Int, inlineOptions(ONLY_LOCAL_RETURN) block: () -> Pair<T1, T2>): Pair<Array<T1>, Array<T2>> {
|
inline fun<reified T1, reified T2> createArray(n: Int, crossinline block: () -> Pair<T1, T2>): Pair<Array<T1>, Array<T2>> {
|
||||||
return Pair(Array(n) { block().first }, Array(n) { block().second })
|
return Pair(Array(n) { block().first }, Array(n) { block().second })
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fun<T1, T2, T3, T4, T5, T6, reified R> recursive(
|
inline fun<T1, T2, T3, T4, T5, T6, reified R> recursive(
|
||||||
inlineOptions(ONLY_LOCAL_RETURN) block: () -> R
|
crossinline block: () -> R
|
||||||
): Pair<Array<R>, Array<R>> {
|
): Pair<Array<R>, Array<R>> {
|
||||||
return createArray(5) { Pair(block(), block()) }
|
return createArray(5) { Pair(block(), block()) }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
annotation class Ann(val arg: String = "abc")
|
annotation class Ann(val arg: String = "abc")
|
||||||
|
|
||||||
Ann class MyClass
|
@Ann class MyClass
|
||||||
|
|
||||||
// 1 @LAnn;\(\)
|
// 1 @LAnn;\(\)
|
||||||
|
|||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
import java.lang.annotation.Retention
|
import java.lang.annotation.Retention
|
||||||
import java.lang.annotation.RetentionPolicy
|
import java.lang.annotation.RetentionPolicy
|
||||||
|
|
||||||
Ann class MyClass
|
@Ann class MyClass
|
||||||
|
|
||||||
Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
annotation class Ann
|
annotation class Ann
|
||||||
|
|
||||||
// 1 @LAnn;()
|
// 1 @LAnn;()
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
Ann class MyClass
|
@Ann class MyClass
|
||||||
|
|
||||||
@Retention(AnnotationRetention.BINARY)
|
@Retention(AnnotationRetention.BINARY)
|
||||||
annotation class Ann
|
annotation class Ann
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Ann class MyClass
|
@Ann class MyClass
|
||||||
|
|
||||||
@Retention(AnnotationRetention.RUNTIME)
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
annotation class Ann
|
annotation class Ann
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Ann class MyClass
|
@Ann class MyClass
|
||||||
|
|
||||||
@Retention(AnnotationRetention.SOURCE)
|
@Retention(AnnotationRetention.SOURCE)
|
||||||
annotation class Ann
|
annotation class Ann
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class A {
|
|||||||
inlineFun { "test" }
|
inlineFun { "test" }
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fun inlineFun(inlineOptions(ONLY_LOCAL_RETURN) lambda: () -> Unit) {
|
inline fun inlineFun(crossinline lambda: () -> Unit) {
|
||||||
val s = object {
|
val s = object {
|
||||||
fun run() {
|
fun run() {
|
||||||
lambda()
|
lambda()
|
||||||
|
|||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
Test fun foo(m : java.lang.reflect.Method) = "OK"
|
@Test fun foo(m : java.lang.reflect.Method) = "OK"
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ import kotlin.test.*
|
|||||||
import org.junit.Test as test
|
import org.junit.Test as test
|
||||||
|
|
||||||
public class Test {
|
public class Test {
|
||||||
test fun f(): Unit {
|
@test fun f(): Unit {
|
||||||
assertEquals(true, !false)
|
assertEquals(true, !false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package test
|
|||||||
|
|
||||||
class E1: Exception()
|
class E1: Exception()
|
||||||
|
|
||||||
Throws(E1::class) JvmOverloads
|
@Throws(E1::class) @JvmOverloads
|
||||||
fun one(a: Int = 1) {}
|
fun one(a: Int = 1) {}
|
||||||
|
|
||||||
class One @Throws(E1::class) constructor(a: Int = 1) {
|
class One @Throws(E1::class) constructor(a: Int = 1) {
|
||||||
|
|||||||
+3
-3
@@ -7,14 +7,14 @@ class A {
|
|||||||
companion object {
|
companion object {
|
||||||
val b: String = "OK"
|
val b: String = "OK"
|
||||||
|
|
||||||
platformStatic fun test1() {
|
@platformStatic fun test1() {
|
||||||
b
|
b
|
||||||
test2()
|
test2()
|
||||||
test3()
|
test3()
|
||||||
"".test4()
|
"".test4()
|
||||||
}
|
}
|
||||||
|
|
||||||
platformStatic fun test2() {
|
@platformStatic fun test2() {
|
||||||
b
|
b
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ class A {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
platformStatic fun String.test4() {
|
@platformStatic fun String.test4() {
|
||||||
b
|
b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ object A {
|
|||||||
|
|
||||||
val b: String = "OK"
|
val b: String = "OK"
|
||||||
|
|
||||||
platformStatic fun test1() {
|
@platformStatic fun test1() {
|
||||||
b
|
b
|
||||||
test2()
|
test2()
|
||||||
test3()
|
test3()
|
||||||
"".test4()
|
"".test4()
|
||||||
}
|
}
|
||||||
|
|
||||||
platformStatic fun test2() {
|
@platformStatic fun test2() {
|
||||||
b
|
b
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ object A {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
platformStatic fun String.test4() {
|
@platformStatic fun String.test4() {
|
||||||
b
|
b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -4,4 +4,4 @@ enum class E { ENTRY }
|
|||||||
|
|
||||||
annotation class Anno(val e: E)
|
annotation class Anno(val e: E)
|
||||||
|
|
||||||
Anno(E.ENTRY) open class Class
|
@Anno(E.ENTRY) open class Class
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user