[FIR2IR] Correct 'this' conversion when it points to non-closest class
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
class B () {}
|
||||
|
||||
open class A(val b : B) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
class A {
|
||||
var result = "Fail"
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
package t
|
||||
|
||||
interface I{
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
open class A(val s: String)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
public object SomeObject {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
class C(x: Int, val y: Int) {
|
||||
fun initChild(x0: Int): Any {
|
||||
var x = x0
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
interface Intf {
|
||||
val aValue: String
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
abstract class Your {
|
||||
abstract val your: String
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ FILE fqName:<root> fileName:/outerClassAccess.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Outer.Inner
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun foo (): kotlin.Unit declared in <root>.Outer' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <root>.Outer.Inner declared in <root>.Outer.Inner.test' type=<root>.Outer.Inner origin=null
|
||||
$this: GET_VAR '<this>: <root>.Outer declared in <root>.Outer' type=<root>.Outer origin=null
|
||||
CLASS CLASS name:Inner2 modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Outer.Inner.Inner2
|
||||
CONSTRUCTOR visibility:public <> ($this:<root>.Outer.Inner.Inner2) returnType:<root>.Outer.Inner.Inner2 [primary]
|
||||
@@ -31,9 +31,9 @@ FILE fqName:<root> fileName:/outerClassAccess.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Outer.Inner.Inner2
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun test (): kotlin.Unit declared in <root>.Outer.Inner' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <root>.Outer.Inner.Inner2 declared in <root>.Outer.Inner.Inner2.test2' type=<root>.Outer.Inner.Inner2 origin=null
|
||||
$this: GET_VAR '<this>: <root>.Outer.Inner declared in <root>.Outer.Inner' type=<root>.Outer.Inner origin=null
|
||||
CALL 'public final fun foo (): kotlin.Unit declared in <root>.Outer' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <root>.Outer.Inner.Inner2 declared in <root>.Outer.Inner.Inner2.test2' type=<root>.Outer.Inner.Inner2 origin=null
|
||||
$this: GET_VAR '<this>: <root>.Outer declared in <root>.Outer' type=<root>.Outer origin=null
|
||||
FUN name:test3 visibility:public modality:FINAL <> ($this:<root>.Outer.Inner.Inner2, $receiver:<root>.Outer) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Outer.Inner.Inner2
|
||||
$receiver: VALUE_PARAMETER name:<this> type:<root>.Outer
|
||||
|
||||
@@ -86,7 +86,7 @@ FILE fqName:<root> fileName:/multipleThisReferences.kt
|
||||
EXPRESSION_BODY
|
||||
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
|
||||
$this: CALL 'public final fun <get-x> (): kotlin.Int declared in <root>.Outer.Inner' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR '<this>: <root>.Host declared in <root>.Host.test' type=<root>.Host origin=null
|
||||
$this: GET_VAR '<this>: <root>.Host.test.<no name provided> declared in <root>.Host.test.<no name provided>' type=<root>.Host.test.<no name provided> origin=null
|
||||
other: CALL 'public final fun <get-y> (): kotlin.Int declared in <root>.Host' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR '<this>: <root>.Host declared in <root>.Host.test' type=<root>.Host origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-xx> visibility:public modality:FINAL <> ($this:<root>.Host.test.<no name provided>) returnType:kotlin.Int
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ FILE fqName:<root> fileName:/outerClassInstanceReference.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun inner (): kotlin.Unit declared in <root>.Outer.Inner'
|
||||
CALL 'public final fun outer (): kotlin.Unit declared in <root>.Outer' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <root>.Outer.Inner declared in <root>.Outer.Inner.inner' type=<root>.Outer.Inner origin=null
|
||||
$this: GET_VAR '<this>: <root>.Outer declared in <root>.Outer' type=<root>.Outer origin=null
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
|
||||
Reference in New Issue
Block a user