[IR BE] Remap dispatch receiver for inner ctor too
- do not forget to add into mapping dispatch receiver - fix KT-40686 (at least part of it) - add test
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
|
||||
// KT-40686
|
||||
|
||||
|
||||
class Outer(val o: String, val oo: String) {
|
||||
inner class InnerArg(val i: String) {
|
||||
val result: String get() = o + i
|
||||
}
|
||||
|
||||
inner class InnerParam(val i: InnerArg = InnerArg("B")) {
|
||||
fun foo() = i.result + oo
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
val o = Outer("A", "C")
|
||||
val i = o.InnerParam()
|
||||
|
||||
val rr = i.foo()
|
||||
if (rr != "ABC") return "FAIL: $rr"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user