Local objects (#215)
* bug fix * bug fix with nested inner classes * - fixed FixMeInner - support of inner classes in local classes - support of object expressions in initializers * comments * merged modification * - review fixes - tests * review fixes * review fixes
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
fun box() {
|
||||
var previous: Any? = null
|
||||
for (i in 0 .. 2) {
|
||||
class Outer {
|
||||
inner class Inner {
|
||||
override fun toString() = i.toString()
|
||||
}
|
||||
|
||||
override fun toString() = Inner().toString()
|
||||
}
|
||||
if (previous != null) println(previous.toString())
|
||||
previous = Outer()
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
box()
|
||||
}
|
||||
Reference in New Issue
Block a user