KT-2714 'enum' annotation should only be allowed on classes

#KT-2714 Fixed
This commit is contained in:
Natalia.Ukhorskaya
2012-09-17 14:15:26 +04:00
parent 65564537dd
commit 694f1f45f8
6 changed files with 39 additions and 2 deletions
@@ -0,0 +1,15 @@
enum class B {}
class A {
<!ILLEGAL_ENUM_ANNOTATION!>enum<!> class object {}
}
<!ILLEGAL_ENUM_ANNOTATION!>enum<!> object O {}
<!ILLEGAL_ENUM_ANNOTATION!>enum<!> trait T {}
<!ILLEGAL_ENUM_ANNOTATION!>enum<!> fun f() = 0
<!ILLEGAL_ENUM_ANNOTATION!>enum<!> val x = 0
<!ILLEGAL_ENUM_ANNOTATION!>enum<!> var y = 0