Prohibit body for annotation class

#KT-1886 Fixed
This commit is contained in:
Natalia.Ukhorskaya
2012-09-13 16:26:07 +04:00
parent 954003872d
commit 60bdae9d75
15 changed files with 53 additions and 24 deletions
@@ -1,4 +1,4 @@
annotation class test {}
annotation class test
fun foo(test <!UNUSED_PARAMETER!>f<!> : Int) {}
@@ -8,4 +8,4 @@ var bar : Int = 1
val x : (Int) -> Int = {([test] x : Int) -> x}
class Hello(test args: Any) {
}
}
@@ -0,0 +1,29 @@
annotation class Annotation2() <!ANNOTATION_CLASS_WITH_BODY!>{
public val s: String = ""
}<!>
annotation class Annotation3() <!ANNOTATION_CLASS_WITH_BODY!>{
public fun foo() {}
}<!>
annotation class Annotation4() <!ANNOTATION_CLASS_WITH_BODY!>{
class Foo() {}
}<!>
annotation class Annotation5() <!ANNOTATION_CLASS_WITH_BODY!>{
class object {}
}<!>
annotation class Annotation6() <!ANNOTATION_CLASS_WITH_BODY!>{
{}
}<!>
annotation class Annotation1() <!ANNOTATION_CLASS_WITH_BODY!>{}<!>
annotation class Annotation7(val name: String) <!ANNOTATION_CLASS_WITH_BODY!>{}<!>
annotation class Annotation8(var name: String = "") <!ANNOTATION_CLASS_WITH_BODY!>{}<!>
annotation class Annotation9(name: String)
annotation class Annotation10
+2 -3
View File
@@ -1,7 +1,6 @@
package rendererTest
annotation class TheAnnotation {
}
annotation class TheAnnotation
[TheAnnotation]
public open class TheClass<out T : Int, X> {
@@ -38,4 +37,4 @@ trait TheTrait {
//internal trait TheTrait defined in rendererTest
//internal abstract fun abstractFun() : Unit defined in rendererTest.TheTrait
//class object : rendererTest.TheClass<jet.Int, jet.Int> defined in rendererTest.TheTrait
//internal final fun classObjectFunction() : jet.Int defined in rendererTest.TheTrait.<class-object-for-TheTrait>
//internal final fun classObjectFunction() : jet.Int defined in rendererTest.TheTrait.<class-object-for-TheTrait>