diff --git a/compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.A.kt b/compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.A.kt new file mode 100644 index 00000000000..5200f1254b2 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.A.kt @@ -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 \ No newline at end of file diff --git a/compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.B.kt b/compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.B.kt new file mode 100644 index 00000000000..efa50fe6ebf --- /dev/null +++ b/compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.B.kt @@ -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) { + MyClass() +} + + diff --git a/compiler/tests/org/jetbrains/jet/jvm/compiler/CompileKotlinAgainstKotlinTestGenerated.java b/compiler/tests/org/jetbrains/jet/jvm/compiler/CompileKotlinAgainstKotlinTestGenerated.java index 27f66d76227..457171a6a21 100644 --- a/compiler/tests/org/jetbrains/jet/jvm/compiler/CompileKotlinAgainstKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/jvm/compiler/CompileKotlinAgainstKotlinTestGenerated.java @@ -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");