'annotation' keyword should be allowed only on classes

#KT-2785 Fixed
This commit is contained in:
Natalia.Ukhorskaya
2013-07-25 16:15:00 +04:00
parent 09b163069f
commit e11f130278
5 changed files with 31 additions and 5 deletions
@@ -0,0 +1,15 @@
annotation class B
class A {
<!ILLEGAL_ANNOTATION_KEYWORD!>annotation<!> class object {}
}
<!ILLEGAL_ANNOTATION_KEYWORD!>annotation<!> object O {}
<!ILLEGAL_ANNOTATION_KEYWORD!>annotation<!> trait T {}
<!ILLEGAL_ANNOTATION_KEYWORD!>annotation<!> fun f() = 0
<!ILLEGAL_ANNOTATION_KEYWORD!>annotation<!> val x = 0
<!ILLEGAL_ANNOTATION_KEYWORD!>annotation<!> var y = 0