Nested classes are no more allowed inside any anonymous objects or local classes #KT-13510 Fixed

(cherry picked from commit 5c3ec6c)
This commit is contained in:
Mikhail Glukhikh
2016-08-25 19:48:57 +03:00
committed by Mikhail Glukhikh
parent f8039249c6
commit cd717467f0
5 changed files with 30 additions and 2 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
// KT-6026 Exception on instantiating a nested class in an anonymous object
val oo = object {
class Nested
// Forbidden in KT-13510
<!NESTED_CLASS_NOT_ALLOWED!>class Nested<!>
fun f1() = Nested(<!TOO_MANY_ARGUMENTS!>11<!>)
}