FIR: fix dispatch receivers for objects
This commit is contained in:
@@ -169,6 +169,10 @@ class CallResolver(
|
||||
|
||||
// Member of implicit receiver' type *and* relevant scope
|
||||
for (implicitReceiverValue in implicitReceiverValues) {
|
||||
if (!blockDispatchReceivers || implicitReceiverValue !is ImplicitDispatchReceiverValue) {
|
||||
// Direct use of implicit receiver (see inside)
|
||||
group = processImplicitReceiver(towerDataConsumer, implicitReceiverValue, group)
|
||||
}
|
||||
val implicitScope = implicitReceiverValue.implicitScope
|
||||
if (implicitScope != null) {
|
||||
// Regular implicit receiver scope (outer objects only?)
|
||||
@@ -188,15 +192,10 @@ class CallResolver(
|
||||
// }
|
||||
towerDataConsumer.consume(TowerDataKind.TOWER_LEVEL, ScopeTowerLevel(session, implicitCompanionScope), group++)
|
||||
}
|
||||
if (blockDispatchReceivers) {
|
||||
continue
|
||||
}
|
||||
if (!implicitReceiverValue.boundSymbol.fir.isInner) {
|
||||
blockDispatchReceivers = true
|
||||
}
|
||||
}
|
||||
// Direct use of implicit receiver (see inside)
|
||||
group = processImplicitReceiver(towerDataConsumer, implicitReceiverValue, group)
|
||||
}
|
||||
|
||||
// Member of top-level scope & importing scope
|
||||
|
||||
@@ -153,7 +153,11 @@ class ScopeTowerLevel(
|
||||
val implicitExtensionReceiver: ImplicitReceiverValue<*>? = null
|
||||
) : SessionBasedTowerLevel(session) {
|
||||
private fun FirCallableSymbol<*>.hasConsistentReceivers(extensionReceiver: ReceiverValue?): Boolean =
|
||||
hasConsistentExtensionReceiver(extensionReceiver) && (scope is FirAbstractImportingScope || dispatchReceiverValue() == null)
|
||||
when {
|
||||
!hasConsistentExtensionReceiver(extensionReceiver) -> false
|
||||
scope is FirAbstractImportingScope -> true
|
||||
else -> dispatchReceiverValue().let { it == null || it.klassSymbol.fir.classKind == ClassKind.OBJECT }
|
||||
}
|
||||
|
||||
override fun <T : AbstractFirBasedSymbol<*>> processElementsByName(
|
||||
token: TowerScopeLevel.Token<T>,
|
||||
@@ -171,7 +175,7 @@ class ScopeTowerLevel(
|
||||
if (candidate.hasConsistentReceivers(extensionReceiver)) {
|
||||
val dispatchReceiverValue = when (candidate) {
|
||||
is FirBackingFieldSymbol -> candidate.fir.symbol.dispatchReceiverValue()
|
||||
else -> null
|
||||
else -> candidate.dispatchReceiverValue()
|
||||
}
|
||||
processor.consumeCandidate(
|
||||
candidate as T, dispatchReceiverValue = dispatchReceiverValue,
|
||||
@@ -184,7 +188,7 @@ class ScopeTowerLevel(
|
||||
TowerScopeLevel.Token.Functions -> scope.processFunctionsByName(name) { candidate ->
|
||||
if (candidate.hasConsistentReceivers(extensionReceiver)) {
|
||||
processor.consumeCandidate(
|
||||
candidate as T, dispatchReceiverValue = null,
|
||||
candidate as T, dispatchReceiverValue = candidate.dispatchReceiverValue(),
|
||||
implicitExtensionReceiverValue = implicitExtensionReceiver
|
||||
)
|
||||
} else {
|
||||
@@ -241,15 +245,12 @@ class QualifiedReceiverTowerLevel(session: FirSession) : SessionBasedTowerLevel(
|
||||
}
|
||||
|
||||
fun FirCallableDeclaration<*>.dispatchReceiverValue(session: FirSession): ClassDispatchReceiverValue? {
|
||||
// TODO: this is not true at least for inner class constructors
|
||||
// TODO: this is not true atCall least for inner class constructors
|
||||
if (this is FirConstructor) return null
|
||||
val id = (this.symbol as ConeCallableSymbol).callableId.classId ?: return null
|
||||
val symbol = session.service<FirSymbolProvider>().getClassLikeSymbolByFqName(id) as? FirClassSymbol ?: return null
|
||||
val regularClass = symbol.fir
|
||||
|
||||
// TODO: this is also not true, but objects can be also imported, companions can be also used implicitly
|
||||
if (regularClass.classKind == ClassKind.OBJECT) return null
|
||||
|
||||
return ClassDispatchReceiverValue(regularClass.symbol)
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ FILE: companion.kt
|
||||
}
|
||||
|
||||
public final fun bar(): R|kotlin/Unit| {
|
||||
R|/A.Companion.foo|()
|
||||
D|this@R|/A.Companion||.R|/A.Companion.foo|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ FILE: companionExtension.kt
|
||||
}
|
||||
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
E|this@R|/My||.R|/My.Companion.foo|()
|
||||
D|this@R|/My.Companion||E|this@R|/My||.R|/My.Companion.foo|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,10 +26,10 @@ FILE: importedReceiver.kt
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
E|Int(42)|.R|/foo|<R|kotlin/Int|>()
|
||||
E|String()|.R|/foo|<R|kotlin/String|>()
|
||||
E|Int(42)|.R|/My.bar|<R|kotlin/Int|>()
|
||||
E|String()|.R|/My.bar|<R|kotlin/String|>()
|
||||
R|/My.baz|()
|
||||
E|Boolean(true)|.R|/My.gau|()
|
||||
R|FakeOverride</Your.wat: R|kotlin/Unit|>|()
|
||||
D|this@R|/My||E|Int(42)|.R|/My.bar|<R|kotlin/Int|>()
|
||||
D|this@R|/My||E|String()|.R|/My.bar|<R|kotlin/String|>()
|
||||
D|this@R|/My||.R|/My.baz|()
|
||||
D|this@R|/My||E|Boolean(true)|.R|/My.gau|()
|
||||
D|this@R|/Your||.R|FakeOverride</Your.wat: R|kotlin/Unit|>|()
|
||||
Boolean(false).<Inapplicable(WRONG_RECEIVER): [/Your.watwat]>#()
|
||||
}
|
||||
|
||||
@@ -15,11 +15,11 @@ FILE: outerObject.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val y: R|kotlin/Int| = R|/Outer.x|
|
||||
public final val y: R|kotlin/Int| = D|this@R|/Outer||.R|/Outer.x|
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
E|this@R|/Outer.Nested||.R|/Outer.foo|()
|
||||
D|this@R|/Outer||E|this@R|/Outer.Nested||.R|/Outer.foo|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ FILE: enums.kt
|
||||
|
||||
}
|
||||
|
||||
public final val g: R|kotlin/Double| = D|D|R|/Planet.Companion.G||.R|kotlin/Double.times|(R|<local>/m|)|.R|kotlin/Double.div|(D|R|<local>/r||.R|kotlin/Double.times|(R|<local>/r|))
|
||||
public final val g: R|kotlin/Double| = D|D|D|this@R|/Planet.Companion||.R|/Planet.Companion.G||.R|kotlin/Double.times|(R|<local>/m|)|.R|kotlin/Double.div|(D|R|<local>/r||.R|kotlin/Double.times|(R|<local>/r|))
|
||||
public get(): R|kotlin/Double|
|
||||
|
||||
public abstract fun sayHello(): R|kotlin/Unit|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FILE: importFromObject.kt
|
||||
public final fun bar(): R|kotlin/Unit| {
|
||||
R|a/A.foo|()
|
||||
D|this@R|a/A||.R|a/A.foo|()
|
||||
}
|
||||
|
||||
@@ -47,7 +47,9 @@ FILE fqName:<root> fileName:/objectWithInitializers.kt
|
||||
ANONYMOUS_INITIALIZER isStatic=false
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public [final]' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Test declared in <root>.Test' type=<root>.Test origin=null
|
||||
value: CALL 'public final fun <get-x> (): kotlin.Int declared in <root>.Test' type=kotlin.Int origin=null
|
||||
$this: GET_VAR '<this>: <root>.Test declared in <root>.Test' type=<root>.Test origin=null
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
|
||||
+2
-2
@@ -59,7 +59,7 @@ FILE fqName:<root> fileName:/memberExtension.kt
|
||||
FIELD DELEGATE name:plusK$delegate type:<root>.Host.StringDelegate visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
CALL 'public final fun provideDelegate (host: kotlin.Any?, p: kotlin.Any): <root>.Host.StringDelegate declared in <root>.Host' type=<root>.Host.StringDelegate origin=null
|
||||
$this: CONST String type=kotlin.String value="K"
|
||||
$this: GET_VAR '<this>: <root>.Host declared in <root>.Host' type=<root>.Host origin=null
|
||||
host: GET_VAR '<this>: <root>.Host declared in <root>.Host' type=<root>.Host origin=null
|
||||
p: PROPERTY_REFERENCE 'public final plusK: IrErrorType [delegated,val]' field=null getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-plusK> visibility:public modality:FINAL <> ($this:<root>.Host) returnType:IrErrorType
|
||||
@@ -74,7 +74,7 @@ FILE fqName:<root> fileName:/memberExtension.kt
|
||||
FIELD PROPERTY_BACKING_FIELD name:ok type:IrErrorType visibility:public [final]
|
||||
EXPRESSION_BODY
|
||||
CALL 'public final fun <get-plusK> (): IrErrorType declared in <root>.Host' type=IrErrorType origin=null
|
||||
$this: CONST String type=kotlin.String value="O"
|
||||
$this: GET_VAR '<this>: <root>.Host declared in <root>.Host' type=<root>.Host origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-ok> visibility:public modality:FINAL <> ($this:<root>.Host) returnType:IrErrorType
|
||||
correspondingProperty: PROPERTY name:ok visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Host
|
||||
|
||||
@@ -56,7 +56,7 @@ FILE fqName:<root> fileName:/destructuring1.kt
|
||||
GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.A
|
||||
VAR name:x type:kotlin.Int [val]
|
||||
CALL 'public final fun component1 (): kotlin.Int declared in <root>.B' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val <destruct>: <root>.A [val] declared in <root>.test' type=<root>.A origin=null
|
||||
$this: GET_VAR '<this>: <root>.B declared in <root>.B' type=<root>.B origin=null
|
||||
VAR name:y type:kotlin.Int [val]
|
||||
CALL 'public final fun component2 (): kotlin.Int declared in <root>.B' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val <destruct>: <root>.A [val] declared in <root>.test' type=<root>.A origin=null
|
||||
$this: GET_VAR '<this>: <root>.B declared in <root>.B' type=<root>.B origin=null
|
||||
|
||||
+3
-3
@@ -62,10 +62,10 @@ FILE fqName:<root> fileName:/destructuringWithUnderscore.kt
|
||||
GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.A
|
||||
VAR name:x type:kotlin.Int [val]
|
||||
CALL 'public final fun component1 (): kotlin.Int declared in <root>.B' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val <destruct>: <root>.A [val] declared in <root>.test' type=<root>.A origin=null
|
||||
$this: GET_VAR '<this>: <root>.B declared in <root>.B' type=<root>.B origin=null
|
||||
VAR name:_ type:kotlin.Int [val]
|
||||
CALL 'public final fun component2 (): kotlin.Int declared in <root>.B' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val <destruct>: <root>.A [val] declared in <root>.test' type=<root>.A origin=null
|
||||
$this: GET_VAR '<this>: <root>.B declared in <root>.B' type=<root>.B origin=null
|
||||
VAR name:z type:kotlin.Int [val]
|
||||
CALL 'public final fun component3 (): kotlin.Int declared in <root>.B' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'val <destruct>: <root>.A [val] declared in <root>.test' type=<root>.A origin=null
|
||||
$this: GET_VAR '<this>: <root>.B declared in <root>.B' type=<root>.B origin=null
|
||||
|
||||
@@ -29,3 +29,4 @@ FILE fqName:test fileName:/funImportedFromObject.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun test (): kotlin.String declared in test'
|
||||
CALL 'public final fun foo <T> (): kotlin.String [inline] declared in test.Host' type=kotlin.String origin=null
|
||||
<T>: <none>
|
||||
$this: GET_VAR '<this>: test.Host declared in test.Host' type=test.Host origin=null
|
||||
|
||||
@@ -51,6 +51,7 @@ FILE fqName:<root> fileName:/membersImportedFromObject.kt
|
||||
FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Int visibility:public [final,static]
|
||||
EXPRESSION_BODY
|
||||
CALL 'public final fun foo (): kotlin.Int declared in <root>.A' type=kotlin.Int origin=null
|
||||
$this: GET_VAR '<this>: <root>.A declared in <root>.A' type=<root>.A origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
@@ -60,6 +61,7 @@ FILE fqName:<root> fileName:/membersImportedFromObject.kt
|
||||
FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Int visibility:public [final,static]
|
||||
EXPRESSION_BODY
|
||||
CALL 'public final fun <get-bar> (): kotlin.Int declared in <root>.A' type=kotlin.Int origin=null
|
||||
$this: GET_VAR '<this>: <root>.A declared in <root>.A' type=<root>.A origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
@@ -69,7 +71,7 @@ FILE fqName:<root> fileName:/membersImportedFromObject.kt
|
||||
FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.Int visibility:public [final,static]
|
||||
EXPRESSION_BODY
|
||||
CALL 'public final fun fooExt (): kotlin.Int declared in <root>.A' type=kotlin.Int origin=null
|
||||
$this: CONST Int type=kotlin.Int value=1
|
||||
$this: GET_VAR '<this>: <root>.A declared in <root>.A' type=<root>.A origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test3> visibility:public modality:FINAL <> () returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
@@ -79,7 +81,7 @@ FILE fqName:<root> fileName:/membersImportedFromObject.kt
|
||||
FIELD PROPERTY_BACKING_FIELD name:test4 type:kotlin.Int visibility:public [final,static]
|
||||
EXPRESSION_BODY
|
||||
CALL 'public final fun <get-barExt> (): kotlin.Int declared in <root>.A' type=kotlin.Int origin=null
|
||||
$this: CONST Int type=kotlin.Int value=1
|
||||
$this: GET_VAR '<this>: <root>.A declared in <root>.A' type=<root>.A origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test4> visibility:public modality:FINAL <> () returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
|
||||
@@ -31,8 +31,10 @@ FILE fqName:<root> fileName:/objectReference.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Z
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Z declared in <root>.Z' type=<root>.Z origin=null
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
CALL 'public final fun foo (): kotlin.Unit declared in <root>.Z' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <root>.Z declared in <root>.Z' type=<root>.Z origin=null
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null
|
||||
receiver: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Z
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
@@ -47,8 +49,10 @@ FILE fqName:<root> fileName:/objectReference.kt
|
||||
ANONYMOUS_INITIALIZER isStatic=false
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Z declared in <root>.Z' type=<root>.Z origin=null
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
CALL 'public final fun foo (): kotlin.Unit declared in <root>.Z' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <root>.Z declared in <root>.Z' type=<root>.Z origin=null
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null
|
||||
receiver: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Z
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
@@ -58,8 +62,10 @@ FILE fqName:<root> fileName:/objectReference.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Z.Nested
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Z declared in <root>.Z' type=<root>.Z origin=null
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
CALL 'public final fun foo (): kotlin.Unit declared in <root>.Z' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <root>.Z declared in <root>.Z' type=<root>.Z origin=null
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null
|
||||
receiver: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Z
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
@@ -86,8 +92,10 @@ FILE fqName:<root> fileName:/objectReference.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Z
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Z declared in <root>.Z' type=<root>.Z origin=null
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
CALL 'public final fun foo (): kotlin.Unit declared in <root>.Z' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <root>.Z declared in <root>.Z' type=<root>.Z origin=null
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null
|
||||
receiver: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Z
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
@@ -113,8 +121,10 @@ FILE fqName:<root> fileName:/objectReference.kt
|
||||
ANONYMOUS_INITIALIZER isStatic=false
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Z declared in <root>.Z' type=<root>.Z origin=null
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
CALL 'public final fun foo (): kotlin.Unit declared in <root>.Z' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <root>.Z declared in <root>.Z' type=<root>.Z origin=null
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null
|
||||
receiver: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Z
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
@@ -124,8 +134,10 @@ FILE fqName:<root> fileName:/objectReference.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Z.anObject.<no name provided>
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Z declared in <root>.Z' type=<root>.Z origin=null
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
CALL 'public final fun foo (): kotlin.Unit declared in <root>.Z' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <root>.Z declared in <root>.Z' type=<root>.Z origin=null
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null
|
||||
receiver: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Z
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
@@ -156,8 +168,10 @@ FILE fqName:<root> fileName:/objectReference.kt
|
||||
$receiver: VALUE_PARAMETER name:<this> type:<root>.Z
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Z declared in <root>.Z' type=<root>.Z origin=null
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
CALL 'public final fun foo (): kotlin.Unit declared in <root>.Z' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <root>.Z declared in <root>.Z' type=<root>.Z origin=null
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null
|
||||
receiver: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Z
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
|
||||
+1
@@ -22,6 +22,7 @@ FILE fqName:<root> fileName:/objectReferenceInFieldInitializer.kt
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="1234"
|
||||
CALL 'private final fun <get-a> (): kotlin.String declared in <root>.A' type=kotlin.String origin=null
|
||||
$this: GET_VAR '<this>: <root>.A declared in <root>.A' type=<root>.A origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-b> visibility:private modality:FINAL <> ($this:<root>.A) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:b visibility:private modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A
|
||||
|
||||
@@ -148,6 +148,7 @@ FILE fqName:<root> fileName:/useImportedMember.kt
|
||||
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'public final fun f (s: kotlin.Int): kotlin.Int declared in <root>.C' type=kotlin.Int origin=null
|
||||
$this: GET_VAR '<this>: <root>.C declared in <root>.C' type=<root>.C origin=null
|
||||
s: CONST Int type=kotlin.Int value=1
|
||||
arg1: CONST Int type=kotlin.Int value=1
|
||||
then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
@@ -157,6 +158,7 @@ FILE fqName:<root> fileName:/useImportedMember.kt
|
||||
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'public final fun f (s: kotlin.String): kotlin.Int declared in <root>.C' type=kotlin.Int origin=null
|
||||
$this: GET_VAR '<this>: <root>.C declared in <root>.C' type=<root>.C origin=null
|
||||
s: CONST String type=kotlin.String value="s"
|
||||
arg1: CONST Int type=kotlin.Int value=2
|
||||
then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
@@ -166,7 +168,7 @@ FILE fqName:<root> fileName:/useImportedMember.kt
|
||||
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'public final fun f (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=null
|
||||
$this: CONST Boolean type=kotlin.Boolean value=true
|
||||
$this: GET_VAR '<this>: <root>.C declared in <root>.C' type=<root>.C origin=null
|
||||
arg1: CONST Int type=kotlin.Int value=3
|
||||
then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
CONST String type=kotlin.String value="3"
|
||||
@@ -175,16 +177,19 @@ FILE fqName:<root> fileName:/useImportedMember.kt
|
||||
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=null
|
||||
$this: GET_VAR '<this>: <root>.C declared in <root>.C' type=<root>.C origin=null
|
||||
arg1: CONST Int type=kotlin.Int value=4
|
||||
then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
CONST String type=kotlin.String value="4"
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <root>.C declared in <root>.C' type=<root>.C origin=null
|
||||
value: CONST Int type=kotlin.Int value=5
|
||||
WHEN type=kotlin.Unit origin=IF
|
||||
BRANCH
|
||||
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=null
|
||||
$this: GET_VAR '<this>: <root>.C declared in <root>.C' type=<root>.C origin=null
|
||||
arg1: CONST Int type=kotlin.Int value=5
|
||||
then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
CONST String type=kotlin.String value="5"
|
||||
@@ -193,7 +198,7 @@ FILE fqName:<root> fileName:/useImportedMember.kt
|
||||
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'public final fun <get-ext> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=null
|
||||
$this: CONST Int type=kotlin.Int value=5
|
||||
$this: GET_VAR '<this>: <root>.C declared in <root>.C' type=<root>.C origin=null
|
||||
arg1: CONST Int type=kotlin.Int value=6
|
||||
then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
CONST String type=kotlin.String value="6"
|
||||
@@ -203,6 +208,7 @@ FILE fqName:<root> fileName:/useImportedMember.kt
|
||||
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'public final fun g1 <T> (t: T of <root>.C.g1): T of <root>.C.g1 declared in <root>.C' type=kotlin.String origin=null
|
||||
<T>: <none>
|
||||
$this: GET_VAR '<this>: <root>.C declared in <root>.C' type=<root>.C origin=null
|
||||
t: CONST String type=kotlin.String value="7"
|
||||
arg1: CONST String type=kotlin.String value="7"
|
||||
then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
@@ -212,7 +218,7 @@ FILE fqName:<root> fileName:/useImportedMember.kt
|
||||
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'public final fun <get-g2> (): T of <uninitialized parent> declared in <root>.C' type=kotlin.String origin=null
|
||||
$this: CONST String type=kotlin.String value="8"
|
||||
$this: GET_VAR '<this>: <root>.C declared in <root>.C' type=<root>.C origin=null
|
||||
arg1: CONST String type=kotlin.String value="8"
|
||||
then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
CONST String type=kotlin.String value="8"
|
||||
@@ -229,7 +235,7 @@ FILE fqName:<root> fileName:/useImportedMember.kt
|
||||
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'public final fun <get-fromClass> (): T of <uninitialized parent> declared in <root>.BaseClass' type=kotlin.String origin=null
|
||||
$this: CONST String type=kotlin.String value="10"
|
||||
$this: GET_VAR '<this>: <root>.BaseClass declared in <root>.BaseClass' type=<root>.BaseClass origin=null
|
||||
arg1: CONST String type=kotlin.String value="10"
|
||||
then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
CONST String type=kotlin.String value="10"
|
||||
@@ -238,6 +244,7 @@ FILE fqName:<root> fileName:/useImportedMember.kt
|
||||
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'public open fun genericFromSuper (g: kotlin.String): kotlin.String declared in <root>.I' type=kotlin.String origin=null
|
||||
$this: GET_VAR '<this>: <root>.I declared in <root>.I' type=<root>.I<*> origin=null
|
||||
g: CONST String type=kotlin.String value="11"
|
||||
arg1: CONST String type=kotlin.String value="11"
|
||||
then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
|
||||
@@ -9,6 +9,7 @@ FILE fqName:<root> fileName:/companion.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Z
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun test (): kotlin.Unit declared in <root>.Z.Companion' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <root>.Z.Companion declared in <root>.Z.Companion' type=<root>.Z.Companion origin=null
|
||||
CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Z.Companion
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Z.Companion [primary]
|
||||
|
||||
@@ -18,6 +18,7 @@ FILE fqName:<root> fileName:/object.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Z.A
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun test (): kotlin.Unit declared in <root>.Z' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <root>.Z declared in <root>.Z' type=<root>.Z origin=null
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
|
||||
Reference in New Issue
Block a user