KT-37448 'this' in delegating constructor call may refer to outer object

This commit is contained in:
Dmitry Petrov
2020-03-12 11:32:57 +03:00
parent 2bd5872782
commit c0b15b1768
13 changed files with 266 additions and 2 deletions
@@ -0,0 +1,11 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class Base(val s: String)
object Host {
class Derived : Base(this.foo())
fun foo() = "OK"
}
fun box() = Host.Derived().s