Prohibit body for annotation class
#KT-1886 Fixed
This commit is contained in:
@@ -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
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user