'superConstructorCall' test folder moved under 'innerNested'

This commit is contained in:
Michael Bogdanov
2016-07-21 13:11:20 +03:00
parent 55382ba848
commit 1d5924d236
22 changed files with 268 additions and 129 deletions
@@ -0,0 +1,15 @@
// TARGET_BACKEND: JVM
// When inner class extends its outer, there are two instances of the outer present in the inner:
// the enclosing one and the one in the super call.
// Here we test that symbols are resolved to the instance created via the super call.
open class Outer(vararg val chars: Char) {
open inner class Inner(val s: String): Outer(s[0], s[1]) {
fun concat() = java.lang.String.valueOf(chars)
}
fun value() = Inner("OK").concat()
}
fun box() = Outer('F', 'a', 'i', 'l').value()