Add test for kotlin compiled property as annotation parameter
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package a
|
||||
|
||||
val i = 2
|
||||
val s = 2.toShort()
|
||||
val f = 2.0.toFloat()
|
||||
val d = 2.0
|
||||
val l = 2L
|
||||
val b = 2.toByte()
|
||||
val bool = true
|
||||
val c = 'c'
|
||||
val str = "str"
|
||||
|
||||
val i2 = i
|
||||
val s2 = s
|
||||
val f2 = f
|
||||
val d2 = d
|
||||
val l2 = l
|
||||
val b2 = b
|
||||
val bool2 = bool
|
||||
val c2 = c
|
||||
val str2 = str
|
||||
@@ -0,0 +1,26 @@
|
||||
import java.lang.annotation.Retention
|
||||
import java.lang.annotation.RetentionPolicy
|
||||
import a.*
|
||||
|
||||
Ann(i, s, f, d, l, b, bool, c, str)
|
||||
Ann(i2, s2, f2, d2, l2, b2, bool2, c2, str2)
|
||||
class MyClass
|
||||
|
||||
Retention(RetentionPolicy.RUNTIME)
|
||||
annotation class Ann(
|
||||
val i: Int,
|
||||
val s: Short,
|
||||
val f: Float,
|
||||
val d: Double,
|
||||
val l: Long,
|
||||
val b: Byte,
|
||||
val bool: Boolean,
|
||||
val c: Char,
|
||||
val str: String
|
||||
)
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
MyClass()
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -91,6 +91,11 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl
|
||||
doTest("compiler/testData/compileKotlinAgainstKotlin/InnerObject.A.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("KotlinPropertyAsAnnotationParameter.A.kt")
|
||||
public void testKotlinPropertyAsAnnotationParameter() throws Exception {
|
||||
doTest("compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.A.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Simple.A.kt")
|
||||
public void testSimple() throws Exception {
|
||||
doTest("compiler/testData/compileKotlinAgainstKotlin/Simple.A.kt");
|
||||
|
||||
Reference in New Issue
Block a user