[KT-4124] Support invocation of constructor of inner class from extension method

This commit is contained in:
Alexey Andreev
2016-02-18 15:28:58 +03:00
parent 9238afc439
commit d067068774
3 changed files with 33 additions and 0 deletions
@@ -0,0 +1,25 @@
package foo
var i = 0
abstract class Base {
val base = "b" + i++
inner class Inner {
fun o() = "O" + base
fun k() = "K" + base
}
}
class Child : Base()
fun box(): String {
var result = ""
result += Child().Inner().o()
fun Child.f() {
result += Inner().k()
}
Child().f()
return if (result == "Ob0Kb1") "OK" else result
}