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:
committed by
Mikhail Glukhikh
parent
f8039249c6
commit
cd717467f0
+2
-1
@@ -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<!>)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user