Prohibit objects inside inner classes

#KT-16232 Fixed
This commit is contained in:
Denis Zharkov
2017-02-10 16:46:46 +03:00
parent 5b9b003e02
commit d1b17f050b
6 changed files with 32 additions and 1 deletions
@@ -0,0 +1,12 @@
// SKIP_TXT
class Outer {
inner class Inner1 {
<!NESTED_OBJECT_NOT_ALLOWED!>object Obj1<!>
<!WRONG_MODIFIER_CONTAINING_DECLARATION!>companion<!> object Obj2
inner class Inner2 {
<!NESTED_OBJECT_NOT_ALLOWED!>object Obj3<!>
}
}
}