psi2ir: handle 'this' as reference to a super companion object
In super class constructor arguments, 'this' can be resolved as a reference to a companion object of a superclass. This breaks an assumption in psi2ir that 'this' can only refer to some receiver from the current scope. If 'this' refers to an 'object' (including 'companion obejct'), and we are not inside the corresponding class scope, then 'this' represents a reference to a singleton instance "by name" (represented as IrGetObjectValue).
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR, JS_IR
|
||||
|
||||
fun WithCompanion.test(): String {
|
||||
object : WithCompanion(this) {}
|
||||
return "OK"
|
||||
|
||||
Reference in New Issue
Block a user