Report a proper error on class object in enum entry or object

CLASS_OBJECT_NOT_ALLOWED instead of MANY_CLASS_OBJECTS
This commit is contained in:
Alexander Udalov
2013-11-21 16:25:10 +04:00
parent 2e4807856f
commit dce9fbb91c
3 changed files with 27 additions and 4 deletions
@@ -0,0 +1,11 @@
enum class E {
FIRST
SECOND {
<!CLASS_OBJECT_NOT_ALLOWED!>class object {
fun foo() = 42
}<!>
}
}
fun f() = E.SECOND.<!UNRESOLVED_REFERENCE!>foo<!>()