FIR call resolve: set values of dispatch & extension receivers

This commit is contained in:
Mikhail Glukhikh
2019-08-27 17:43:32 +03:00
parent 67a7243361
commit b531e535b6
81 changed files with 337 additions and 237 deletions
@@ -26,6 +26,8 @@ fun FirFunctionCall.copy(
arguments: List<FirExpression> = this.arguments,
calleeReference: FirNamedReference = this.calleeReference,
explicitReceiver: FirExpression? = this.explicitReceiver,
dispatchReceiver: FirExpression = this.dispatchReceiver,
extensionReceiver: FirExpression = this.extensionReceiver,
psi: PsiElement? = this.psi,
safe: Boolean = this.safe,
typeArguments: List<FirTypeProjection> = this.typeArguments,
@@ -36,6 +38,8 @@ fun FirFunctionCall.copy(
this.arguments.addAll(arguments)
this.calleeReference = calleeReference
this.explicitReceiver = explicitReceiver
this.dispatchReceiver = dispatchReceiver
this.extensionReceiver = extensionReceiver
this.typeArguments.addAll(typeArguments)
this.typeRef = resultType
}
@@ -11,11 +11,10 @@ import org.jetbrains.kotlin.fir.expressions.FirExpression
import org.jetbrains.kotlin.fir.expressions.FirFunctionCall
import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccess
import org.jetbrains.kotlin.fir.expressions.FirStatement
import org.jetbrains.kotlin.fir.expressions.impl.FirNoReceiverExpression
import org.jetbrains.kotlin.fir.expressions.impl.FirResolvedQualifierImpl
import org.jetbrains.kotlin.fir.references.FirBackingFieldReferenceImpl
import org.jetbrains.kotlin.fir.references.FirErrorNamedReference
import org.jetbrains.kotlin.fir.references.FirResolvedCallableReferenceImpl
import org.jetbrains.kotlin.fir.references.FirSimpleNamedReference
import org.jetbrains.kotlin.fir.expressions.impl.FirThisReceiverExpressionImpl
import org.jetbrains.kotlin.fir.references.*
import org.jetbrains.kotlin.fir.resolve.BodyResolveComponents
import org.jetbrains.kotlin.fir.resolve.calls.*
import org.jetbrains.kotlin.fir.resolve.transformers.*
@@ -33,6 +32,7 @@ import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol
import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol
import org.jetbrains.kotlin.fir.types.ConeKotlinErrorType
import org.jetbrains.kotlin.fir.types.FirTypeRef
import org.jetbrains.kotlin.fir.types.impl.FirResolvedTypeRefImpl
import org.jetbrains.kotlin.resolve.calls.results.TypeSpecificityComparator
class FirCallResolver(
@@ -125,6 +125,8 @@ class FirCallResolver(
val resultFunctionCall = if (candidate != null && candidate.callInfo != info) {
functionCall.copy(
explicitReceiver = candidate.callInfo.explicitReceiver,
dispatchReceiver = candidate.dispatchReceiverExpression(),
extensionReceiver = candidate.extensionReceiverExpression(),
arguments = candidate.callInfo.arguments,
safe = candidate.callInfo.isSafeCall
)
@@ -200,7 +202,12 @@ class FirCallResolver(
}
@Suppress("UNCHECKED_CAST")
val resultExpression = qualifiedAccess.transformCalleeReference(StoreNameReference, nameReference) as T
var resultExpression = qualifiedAccess.transformCalleeReference(StoreNameReference, nameReference) as T
if (candidates.size == 1) {
val candidate = candidates.single()
resultExpression = resultExpression.transformDispatchReceiver(StoreReceiver, candidate.dispatchReceiverExpression()) as T
resultExpression = resultExpression.transformExtensionReceiver(StoreReceiver, candidate.extensionReceiverExpression()) as T
}
if (resultExpression is FirExpression) transformer.storeTypeFromCallee(resultExpression)
return resultExpression
}
@@ -10,10 +10,14 @@ import org.jetbrains.kotlin.fir.declarations.FirDeclaration
import org.jetbrains.kotlin.fir.declarations.FirFile
import org.jetbrains.kotlin.fir.declarations.FirValueParameter
import org.jetbrains.kotlin.fir.expressions.FirExpression
import org.jetbrains.kotlin.fir.expressions.impl.FirNoReceiverExpression
import org.jetbrains.kotlin.fir.expressions.impl.FirThisReceiverExpressionImpl
import org.jetbrains.kotlin.fir.references.FirImplicitThisReference
import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor
import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol
import org.jetbrains.kotlin.fir.types.FirTypeProjection
import org.jetbrains.kotlin.fir.types.FirTypeRef
import org.jetbrains.kotlin.fir.types.impl.FirResolvedTypeRefImpl
import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintStorage
import org.jetbrains.kotlin.resolve.calls.model.PostponedResolvedAtomMarker
import org.jetbrains.kotlin.resolve.calls.tasks.ExplicitReceiverKind
@@ -61,4 +65,22 @@ class Candidate(
var argumentMapping: Map<FirExpression, FirValueParameter>? = null
val postponedAtoms = mutableListOf<PostponedResolvedAtomMarker>()
fun dispatchReceiverExpression(): FirExpression = when (explicitReceiverKind) {
ExplicitReceiverKind.DISPATCH_RECEIVER, ExplicitReceiverKind.BOTH_RECEIVERS -> callInfo.explicitReceiver!!
else -> dispatchReceiverValue?.let {
FirThisReceiverExpressionImpl(null, FirImplicitThisReference(it.klassSymbol)).apply {
typeRef = FirResolvedTypeRefImpl(null, it.type)
}
} ?: FirNoReceiverExpression
}
fun extensionReceiverExpression(): FirExpression = when (explicitReceiverKind) {
ExplicitReceiverKind.EXTENSION_RECEIVER, ExplicitReceiverKind.BOTH_RECEIVERS -> callInfo.explicitReceiver!!
else -> implicitExtensionReceiverValue?.let {
FirThisReceiverExpressionImpl(null, FirImplicitThisReference(it.boundSymbol)).apply {
typeRef = FirResolvedTypeRefImpl(null, it.type)
}
} ?: FirNoReceiverExpression
}
}
@@ -9,6 +9,7 @@ import org.jetbrains.kotlin.fir.FirSession
import org.jetbrains.kotlin.fir.copy
import org.jetbrains.kotlin.fir.declarations.*
import org.jetbrains.kotlin.fir.expressions.*
import org.jetbrains.kotlin.fir.expressions.impl.FirNoReceiverExpression
import org.jetbrains.kotlin.fir.references.FirResolvedCallableReferenceImpl
import org.jetbrains.kotlin.fir.resolve.calls.FirNamedReferenceWithCandidate
import org.jetbrains.kotlin.fir.resolve.calls.candidate
@@ -118,7 +119,9 @@ class FirCallCompletionResultsWriterTransformer(
calleeReference.psi,
calleeReference.name,
calleeReference.candidateSymbol
)
),
dispatchReceiver = subCandidate.dispatchReceiverExpression(),
extensionReceiver = subCandidate.extensionReceiverExpression()
).compose()
}
@@ -8,9 +8,9 @@ package org.jetbrains.kotlin.fir.resolve.transformers
import org.jetbrains.kotlin.fir.FirElement
import org.jetbrains.kotlin.fir.FirNamedReference
import org.jetbrains.kotlin.fir.FirResolvedCallableReference
import org.jetbrains.kotlin.fir.expressions.FirFunctionCall
import org.jetbrains.kotlin.fir.expressions.FirStatement
import org.jetbrains.kotlin.fir.expressions.FirWrappedArgumentExpression
import org.jetbrains.kotlin.fir.expressions.*
import org.jetbrains.kotlin.fir.expressions.impl.FirNoReceiverExpression
import org.jetbrains.kotlin.fir.resolve.calls.Candidate
import org.jetbrains.kotlin.fir.types.FirImplicitTypeRef
import org.jetbrains.kotlin.fir.types.FirTypeRef
import org.jetbrains.kotlin.fir.visitors.CompositeTransformResult
@@ -93,3 +93,14 @@ internal object StoreCalleeReference : FirTransformer<FirResolvedCallableReferen
return data.compose()
}
}
internal object StoreReceiver : FirTransformer<FirExpression>() {
override fun <E : FirElement> transformElement(element: E, data: FirExpression): CompositeTransformResult<E> {
return element.compose()
}
override fun transformExpression(expression: FirExpression, data: FirExpression): CompositeTransformResult<FirStatement> {
if (expression !is FirNoReceiverExpression) return expression.compose()
return data.compose()
}
}
+4 -4
View File
@@ -23,8 +23,8 @@ FILE: copy.kt
}
public final fun test(some: R|Some|): R|kotlin/Unit| {
lval other: R|Some| = R|<local>/some|.R|/Some.copy|(y = String(123))
lval another: R|Some| = R|<local>/some|.R|/Some.copy|(x = Int(123))
lval same: R|Some| = R|<local>/some|.R|/Some.copy|()
lval different: R|Some| = R|<local>/some|.R|/Some.copy|(Int(456), String(456))
lval other: R|Some| = D|R|<local>/some||.R|/Some.copy|(y = String(123))
lval another: R|Some| = D|R|<local>/some||.R|/Some.copy|(x = Int(123))
lval same: R|Some| = D|R|<local>/some||.R|/Some.copy|()
lval different: R|Some| = D|R|<local>/some||.R|/Some.copy|(Int(456), String(456))
}
@@ -8,11 +8,11 @@ FILE: access.kt
public get(): R|kotlin/Int|
public final fun abc(): R|kotlin/Int| {
^abc R|/Foo.x|
^abc D|this@R|/Foo||.R|/Foo.x|
}
public final fun cba(): R|kotlin/Int| {
^cba R|/Foo.abc|()
^cba D|this@R|/Foo||.R|/Foo.abc|()
}
}
@@ -25,7 +25,7 @@ FILE: access.kt
public get(): R|kotlin/String|
public final fun R|Foo|.abc(): R|kotlin/Int| {
^abc R|/Foo.x|
^abc D|this@R|/Foo||.R|/Foo.x|
}
public final fun bar(): R|Bar| {
@@ -37,16 +37,16 @@ FILE: access.kt
}
public final fun R|Foo|.check(): <ERROR TYPE REF: Inapplicable(INAPPLICABLE): [kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus]> {
^check R|/Foo.abc|().<Inapplicable(INAPPLICABLE): [kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus]>#(R|/Bar.bar|())
^check D|this@R|/Foo||.R|/Foo.abc|().<Inapplicable(INAPPLICABLE): [kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus]>#(D|this@R|/Bar||.R|/Bar.bar|())
}
public final fun R|Foo|.check2(): R|kotlin/String| {
^check2 String().R|kotlin/String.plus|(R|/Bar.bar|())
^check2 D|String()|.R|kotlin/String.plus|(D|this@R|/Bar||.R|/Bar.bar|())
}
}
public final fun R|Foo|.ext(): R|kotlin/Int| {
^ext R|/Foo.x|
^ext D|this@R|/Foo||.R|/Foo.x|
}
public final fun bar(): R|kotlin/Unit| {
}
@@ -42,10 +42,10 @@ FILE: companion.kt
}
public final fun test(): R|kotlin/Unit| {
Q|A|.R|/A.Companion.foo|()
Q|B|.R|/A.bar|()
Q|B|.R|/B.Companion.baz|()
lval x: R|kotlin/String| = Q|A|.R|/A.Companion.D|
lval y: R|kotlin/String| = Q|B|.R|/B.Companion.C|
D|Q|A||.R|/A.Companion.foo|()
D|Q|B||.R|/A.bar|()
D|Q|B||.R|/B.Companion.baz|()
lval x: R|kotlin/String| = D|Q|A||.R|/A.Companion.D|
lval y: R|kotlin/String| = D|Q|B||.R|/B.Companion.C|
lval z: <ERROR TYPE REF: Unresolved name: D> = Q|B|.<Unresolved name: D>#
}
@@ -15,7 +15,7 @@ FILE: companionExtension.kt
}
public final fun test(): R|kotlin/Unit| {
R|/My.Companion.foo|()
E|this@R|/My||.R|/My.Companion.foo|()
}
}
@@ -13,5 +13,5 @@ FILE: constructor.kt
^foo R|/C.C|()
}
public final fun bar(): R|C| {
^bar R|/foo|().R|/C.create|()
^bar D|R|/foo|()|.R|/C.create|()
}
@@ -13,7 +13,7 @@ FILE: dispatchReceiver.kt
public set(value: R|Base|): R|kotlin/Unit|
public final fun check(): R|kotlin/Unit| {
^check R|/My.delegate|.R|/Base.check|()
^check D|D|this@R|/My||.R|/My.delegate||.R|/Base.check|()
}
}
@@ -24,12 +24,12 @@ FILE: importedReceiver.kt
}
public final fun test(): R|kotlin/Unit| {
Int(42).R|/foo|<R|kotlin/Int|>()
String().R|/foo|<R|kotlin/String|>()
Int(42).R|/My.bar|<R|kotlin/Int|>()
String().R|/My.bar|<R|kotlin/String|>()
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|()
Boolean(true).R|/My.gau|()
E|Boolean(true)|.R|/My.gau|()
R|FakeOverride</Your.wat: R|kotlin/Unit|>|()
Boolean(false).<Inapplicable(WRONG_RECEIVER): [/Your.watwat]>#()
}
@@ -14,7 +14,7 @@ FILE: explicitReceiver.kt
}
public final fun bar(): R|Foo| {
^bar R|/Foo.x|.R|/Foo.invoke|()
^bar D|R|/Foo.x||.R|/Foo.invoke|()
}
}
@@ -34,7 +34,7 @@ FILE: explicitReceiver.kt
}
public final fun baz(): R|kotlin/Unit| {
R|/Bar.x|()
D|this@R|/Bar||.R|/Bar.x|()
}
}
@@ -24,7 +24,7 @@ FILE: explicitReceiver2.kt
public get(): R|Bar|
public final fun bar(): R|Foo| {
^bar R|/Foo.x|.R|/Bar.invoke|()
^bar D|R|/Foo.x||.R|/Bar.invoke|()
}
}
@@ -14,7 +14,7 @@ FILE: extension.kt
public get(): R|kotlin/Int|
public final fun foo(): R|Foo| {
^foo R|/Foo.x|.R|/Foo.invoke|()
^foo D|this@R|/Foo||E|R|/Foo.x||.R|/Foo.invoke|()
}
}
@@ -5,7 +5,7 @@ FILE: implicitTypeOrder.kt
}
public final fun bar(): R|A| {
^bar R|/foo|.R|/A.invoke|()
^bar D|R|/foo||.R|/A.invoke|()
}
public final fun invoke(): R|A| {
@@ -4,7 +4,7 @@ FILE: propertyFromParameter.kt
super<R|kotlin/Any|>()
}
public final val name: R|kotlin/String| = R|<local>/name|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/String|>|()
public final val name: R|kotlin/String| = D|R|<local>/name||.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/String|>|()
public get(): R|kotlin/String|
}
@@ -10,5 +10,5 @@ FILE: simple.kt
}
public final fun test(s: R|Simple|): R|kotlin/Unit| {
lval result: R|kotlin/String| = R|<local>/s|.R|/Simple.invoke|()
lval result: R|kotlin/String| = D|R|<local>/s||.R|/Simple.invoke|()
}
@@ -8,7 +8,7 @@ FILE: localExtension.kt
local final fun R|Foo|.bar(): R|kotlin/Unit| {
}
R|<local>/bar|()
E|this@R|/Foo||.R|<local>/bar|()
}
}
@@ -5,7 +5,7 @@ FILE: memberExtension.kt
}
public final fun bar(arg: R|Bar|): R|kotlin/Unit| {
R|<local>/arg|.R|/foo|()
E|R|<local>/arg||.R|/foo|()
}
}
@@ -20,7 +20,7 @@ FILE: memberExtension.kt
}
public final fun bar(arg: R|Foo|): R|kotlin/Unit| {
R|<local>/arg|.R|/Bar.foo|()
D|this@R|/Bar||E|R|<local>/arg||.R|/Bar.foo|()
}
}
@@ -13,5 +13,5 @@ FILE: objects.kt
^use Q|A|
}
public final fun bar(): R|A| {
^bar Q|A|.R|/A.foo|()
^bar D|Q|A||.R|/A.foo|()
}
@@ -19,7 +19,7 @@ FILE: outerObject.kt
public get(): R|kotlin/Int|
public final fun test(): R|kotlin/Unit| {
R|/Outer.foo|()
E|this@R|/Outer.Nested||.R|/Outer.foo|()
}
}
@@ -47,11 +47,11 @@ FILE: qualifiedExpressions.kt
public get(): R|kotlin/Int|
public final fun main(): R|kotlin/Unit| {
Q|a/b|.R|a/b/foo|()
Q|a/b/C|.R|a/b/C.Companion.foo|()
Q|a/b/C.D|.R|a/b/C.D.foo|()
D|Q|a/b/C||.R|a/b/C.Companion.foo|()
D|Q|a/b/C.D||.R|a/b/C.D.foo|()
lval x: R|kotlin/Int| = Q|a/b|.R|a/b/f|
Q|a/b/C|.R|a/b/C.Companion.foo|()
R|a/b/C.C|().R|a/b/C.foo|()
D|Q|a/b/C||.R|a/b/C.Companion.foo|()
D|R|a/b/C.C|()|.R|a/b/C.foo|()
lval e: R|a/b/E| = Q|a/b/E.entry|
lval e1: R|a/b/E| = Q|a/b/E.entry|
}
@@ -27,7 +27,7 @@ FILE: receiverConsistency.kt
public final fun test(): R|kotlin/Unit| {
lval c: R|C| = R|/C.C|()
R|/foo|()
R|<local>/c|.R|/C.bar|()
D|R|<local>/c||.R|/C.bar|()
lval err: R|C| = R|/C.C|()
R|<local>/err|.<Unresolved name: foo>#()
}
@@ -8,7 +8,7 @@ FILE: sameReceiver.kt
}
public final fun test(): R|kotlin/Unit| {
R|/Foo.bar|()
D|this@R|/Foo||E|this@R|/Foo||.R|/Foo.bar|()
}
}
+2 -2
View File
@@ -2,7 +2,7 @@ FILE: extension.kt
public final fun R|kotlin/String|.foo(): R|kotlin/Unit| {
}
public final fun R|kotlin/String|.bar(): R|kotlin/Unit| {
R|/foo|()
E|this@R|/bar||.R|/foo|()
}
public final class My : R|kotlin/Any| {
public constructor(): R|My| {
@@ -10,7 +10,7 @@ FILE: extension.kt
}
public final fun bar(): R|kotlin/Unit| {
R|/foo|()
E|this@R|/My||.R|/foo|()
}
}
+4 -4
View File
@@ -10,10 +10,10 @@ FILE: fib.kt
lvar current: R|kotlin/Int| = Int(1)
lvar prev: R|kotlin/Int| = Int(1)
lval <range>: R|kotlin/ranges/IntRange| = Int(2).R|kotlin/Int.rangeTo|(R|<local>/n|)
lval <iterator>: R|kotlin/collections/IntIterator| = R|<local>/<range>|.R|kotlin/ranges/IntProgression.iterator|()
while(R|<local>/<iterator>|.R|FakeOverride<kotlin/collections/Iterator.hasNext: R|kotlin/Boolean|>|()) {
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
lval <range>: R|kotlin/ranges/IntRange| = D|Int(2)|.R|kotlin/Int.rangeTo|(R|<local>/n|)
lval <iterator>: R|kotlin/collections/IntIterator| = D|R|<local>/<range>||.R|kotlin/ranges/IntProgression.iterator|()
while(D|R|<local>/<iterator>||.R|FakeOverride<kotlin/collections/Iterator.hasNext: R|kotlin/Boolean|>|()) {
lval i: R|kotlin/Int| = D|R|<local>/<iterator>||.R|kotlin/collections/IntIterator.next|()
lval temp: R|kotlin/Int| = R|<local>/current|
R|<local>/current| += R|<local>/prev|
R|<local>/prev| = R|<local>/temp|
@@ -70,7 +70,7 @@ FILE: enums.kt
}
public final val g: R|kotlin/Double| = R|/Planet.Companion.G|.R|kotlin/Double.times|(R|<local>/m|).R|kotlin/Double.div|(R|<local>/r|.R|kotlin/Double.times|(R|<local>/r|))
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 get(): R|kotlin/Double|
public abstract fun sayHello(): R|kotlin/Unit|
@@ -5,7 +5,7 @@ FILE: noPrimaryConstructor.kt
public constructor(x: R|kotlin/String|): R|NoPrimary| {
super<R|kotlin/Any|>()
this@R|/NoPrimary|.R|/NoPrimary.x| = R|<local>/x|
D|this@R|/NoPrimary||.R|/NoPrimary.x| = R|<local>/x|
}
public constructor(): R|NoPrimary| {
@@ -15,7 +15,7 @@ FILE: simpleClass.kt
private get(): R|kotlin/Int|
public final override fun foo(x: R|kotlin/Int|, y: R|kotlin/String|): R|kotlin/String| {
^foo R|<local>/y|.R|kotlin/String.plus|(R|<local>/x|).R|kotlin/String.plus|(R|/SomeClass.baz|)
^foo D|D|R|<local>/y||.R|kotlin/String.plus|(R|<local>/x|)|.R|kotlin/String.plus|(D|this@R|/SomeClass||.R|/SomeClass.baz|)
}
public final override var bar: R|kotlin/Boolean|
+1 -1
View File
@@ -1,6 +1,6 @@
FILE: functionTypes.kt
public final fun <T> simpleRun(f: R|kotlin/Function1<T, kotlin/Unit>|): R|kotlin/Unit| {
^simpleRun R|<local>/f|.R|FakeOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(^simpleRun Unit)
^simpleRun D|R|<local>/f||.R|FakeOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(^simpleRun Unit)
}
public final fun <T, R> R|kotlin/collections/List<T>|.simpleMap(f: R|kotlin/Function1<T, R>|): R|R| {
}
+5 -5
View File
@@ -1,6 +1,6 @@
FILE: localObject.kt
public final fun <T> run(block: R|kotlin/Function0<T>|): R|T| {
^run R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|T|>|()
^run D|R|<local>/block||.R|FakeOverride<kotlin/Function0.invoke: R|T|>|()
}
public abstract interface Foo : R|kotlin/Any| {
public abstract fun foo(): R|kotlin/Int|
@@ -14,7 +14,7 @@ FILE: localObject.kt
}
public final override fun foo(): R|kotlin/Int| {
^foo R|<local>/x|.R|kotlin/Int.plus|(Int(1))
^foo D|R|<local>/x||.R|kotlin/Int.plus|(Int(1))
}
}
@@ -40,7 +40,7 @@ FILE: localObject.kt
}
public final override fun foo(): R|kotlin/Int| {
^foo R|/TestProperty.intConst|.R|kotlin/Int.plus|(Int(1))
^foo D|D|this@R|/TestProperty||.R|/TestProperty.intConst||.R|kotlin/Int.plus|(Int(1))
}
}
@@ -56,7 +56,7 @@ FILE: localObject.kt
}
public final override fun foo(): R|kotlin/Int| {
^foo R|/TestProperty.intConst|.R|kotlin/Int.plus|(Int(1))
^foo D|D|this@R|/TestProperty||.R|/TestProperty.intConst||.R|kotlin/Int.plus|(Int(1))
}
}
@@ -71,7 +71,7 @@ FILE: localObject.kt
}
public final override fun foo(): R|kotlin/Int| {
^foo R|/TestProperty.x|.R|kotlin/Int.plus|(Int(1))
^foo D|D|this@R|/TestProperty||.R|/TestProperty.x||.R|kotlin/Int.plus|(Int(1))
}
}
+11 -11
View File
@@ -5,13 +5,13 @@ FILE: inner.kt
}
public final fun foo(): R|kotlin/Unit| {
R|/Owner.bar|()
this@R|/Owner|.R|/Owner.bar|()
D|this@R|/Owner||.R|/Owner.bar|()
D|this@R|/Owner||.R|/Owner.bar|()
}
public final fun bar(): R|kotlin/Unit| {
lval i: R|Owner.Inner| = R|/Owner.Inner.Inner|()
R|<local>/i|.R|/Owner.Inner.baz|()
D|R|<local>/i||.R|/Owner.Inner.baz|()
}
public final fun err(): R|kotlin/Unit| {
@@ -23,15 +23,15 @@ FILE: inner.kt
}
public final fun baz(): R|kotlin/Unit| {
R|/Owner.Inner.gau|()
this@R|/Owner.Inner|.R|/Owner.Inner.gau|()
D|this@R|/Owner.Inner||.R|/Owner.Inner.gau|()
D|this@R|/Owner.Inner||.R|/Owner.Inner.gau|()
}
public final fun gau(): R|kotlin/Unit| {
lval o: R|Owner| = R|/Owner.Owner|()
R|<local>/o|.R|/Owner.foo|()
R|/Owner.foo|()
this@R|/Owner|.R|/Owner.foo|()
D|R|<local>/o||.R|/Owner.foo|()
D|this@R|/Owner||.R|/Owner.foo|()
D|this@R|/Owner||.R|/Owner.foo|()
this@R|/Owner.Inner|.<Unresolved name: err>#()
}
@@ -40,9 +40,9 @@ FILE: inner.kt
}
public final fun test(): R|kotlin/Unit| {
lval o: R|Owner| = R|/Owner.Owner|()
R|<local>/o|.R|/Owner.foo|()
D|R|<local>/o||.R|/Owner.foo|()
lval err: <ERROR TYPE REF: Unresolved name: Inner> = Q|Owner|.<Unresolved name: Inner>#()
R|<local>/err|.<Unresolved name: baz>#()
lval i: R|Owner.Inner| = R|<local>/o|.R|/Owner.Inner.Inner|()
R|<local>/i|.R|/Owner.Inner.gau|()
lval i: R|Owner.Inner| = D|R|<local>/o||.R|/Owner.Inner.Inner|()
D|R|<local>/i||.R|/Owner.Inner.gau|()
}
+7 -7
View File
@@ -5,13 +5,13 @@ FILE: simple.kt
}
public final fun foo(): R|kotlin/Unit| {
R|/Owner.bar|()
this@R|/Owner|.R|/Owner.bar|()
D|this@R|/Owner||.R|/Owner.bar|()
D|this@R|/Owner||.R|/Owner.bar|()
}
public final fun bar(): R|kotlin/Unit| {
lval n: R|Owner.Nested| = R|/Owner.Nested.Nested|()
R|<local>/n|.R|/Owner.Nested.baz|()
D|R|<local>/n||.R|/Owner.Nested.baz|()
}
public final class Nested : R|kotlin/Any| {
@@ -20,13 +20,13 @@ FILE: simple.kt
}
public final fun baz(): R|kotlin/Unit| {
R|/Owner.Nested.gau|()
this@R|/Owner.Nested|.R|/Owner.Nested.gau|()
D|this@R|/Owner.Nested||.R|/Owner.Nested.gau|()
D|this@R|/Owner.Nested||.R|/Owner.Nested.gau|()
}
public final fun gau(): R|kotlin/Unit| {
lval o: R|Owner| = R|/Owner.Owner|()
R|<local>/o|.R|/Owner.foo|()
D|R|<local>/o||.R|/Owner.foo|()
}
public final fun err(): R|kotlin/Unit| {
@@ -39,7 +39,7 @@ FILE: simple.kt
}
public final fun test(): R|kotlin/Unit| {
lval o: R|Owner| = R|/Owner.Owner|()
R|<local>/o|.R|/Owner.foo|()
D|R|<local>/o||.R|/Owner.foo|()
lval n: <ERROR TYPE REF: Unresolved name: Nested> = Q|Owner|.<Unresolved name: Nested>#()
R|<local>/n|.<Unresolved name: baz>#()
}
@@ -19,5 +19,5 @@ FILE: generics.kt
}
public final fun f(list: R|kotlin/collections/List<kotlin/Int>|): R|kotlin/Unit| {
R|/C.C|().R|/Base.f|<R|kotlin/Int|>(R|<local>/list|)
D|R|/C.C|()|.R|/Base.f|<R|kotlin/Int|>(R|<local>/list|)
}
+2 -2
View File
@@ -35,8 +35,8 @@ FILE: simple.kt
}
public final fun test(): R|kotlin/Unit| {
R|/B.foo|()
R|/B.bar|()
D|this@R|/B||.R|/B.foo|()
D|this@R|/B||.R|/B.bar|()
<Inapplicable(PARAMETER_MAPPING_ERROR): [/B.buz, /A.buz]>#()
}
@@ -21,7 +21,7 @@ FILE: simpleFakeOverride.kt
}
public final fun test(): R|kotlin/Unit| {
R|FakeOverride</A.foo: R|Some|>|(R|/Some.Some|())
D|this@R|/A||.R|FakeOverride</A.foo: R|Some|>|(R|/Some.Some|())
}
}
+5 -5
View File
@@ -19,8 +19,8 @@ FILE: three.kt
}
public final fun bar(): R|kotlin/Unit| {
R|/A.foo|()
R|/Y.baz|()
D|this@R|/A||.R|/A.foo|()
D|this@R|/Y||.R|/Y.baz|()
}
}
@@ -30,9 +30,9 @@ FILE: three.kt
}
public final fun test(): R|kotlin/Unit| {
R|/A.foo|()
R|/B.bar|()
R|/Y.baz|()
D|this@R|/A||.R|/A.foo|()
D|this@R|/B||.R|/B.bar|()
D|this@R|/Y||.R|/Y.baz|()
}
}
@@ -14,7 +14,7 @@ FILE: superMember.kt
}
public final fun bar(): R|kotlin/Unit| {
R|/A.foo|()
D|this@R|/A||.R|/A.foo|()
}
}
+1 -1
View File
@@ -15,7 +15,7 @@ FILE: simpleClass.kt
private get(): R|kotlin/Int|
public final override fun foo(x: R|kotlin/Int|, y: R|kotlin/String|): R|kotlin/String| {
^foo R|<local>/y|.R|kotlin/String.plus|(R|<local>/x|).R|kotlin/String.plus|(R|/SomeClass.baz|)
^foo D|D|R|<local>/y||.R|kotlin/String.plus|(R|<local>/x|)|.R|kotlin/String.plus|(D|this@R|/SomeClass||.R|/SomeClass.baz|)
}
public final override var bar: R|kotlin/Boolean|
@@ -5,15 +5,15 @@ FILE: arrayFirstOrNull.kt
}
public final fun goo(g: R|G|): R|kotlin/Unit| {
lval x: R|G?| = R|<local>/g|.R|/G.a|.R|/firstOrNullX|<R|G|>()
lval x: R|G?| = E|D|R|<local>/g||.R|/G.a||.R|/firstOrNullX|<R|G|>()
}
public final fun <T> R|kotlin/Array<out T>|.firstOrNullX(): R|T?| {
^firstOrNullX when () {
R|kotlin/collections/isEmpty|<R|T|>() -> {
E|this@R|/firstOrNullX||.R|kotlin/collections/isEmpty|<R|T|>() -> {
Null(null)
}
else -> {
this@R|/firstOrNullX|.R|FakeOverride<kotlin/Array.get: R|T|>|(Int(0))
D|this@R|/firstOrNullX||.R|FakeOverride<kotlin/Array.get: R|T|>|(Int(0))
}
}
@@ -1,7 +1,7 @@
FILE: backingField.kt
public final var myProperty: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(1), Int(2), Int(3))
public get(): R|kotlin/collections/List<kotlin/Int>| {
^ F|/myProperty|.R|kotlin/collections/plus|<R|kotlin/Int|>(F|/myProperty|)
^ E|F|/myProperty||.R|kotlin/collections/plus|<R|kotlin/Int|>(F|/myProperty|)
}
public set(param: R|kotlin/collections/List<kotlin/Int>|): R|kotlin/Unit| {
F|/myProperty| = R|<local>/param|
@@ -1,4 +1,4 @@
FILE: companionLoad.kt
public final fun main(): R|kotlin/Unit| {
lval y: R|kotlin/Int| = Q|kotlin/Int|.R|kotlin/Int.Companion.MAX_VALUE|
lval y: R|kotlin/Int| = D|Q|kotlin/Int||.R|kotlin/Int.Companion.MAX_VALUE|
}
+11 -11
View File
@@ -24,19 +24,19 @@ FILE: components.kt
}
public final fun foo(list: R|kotlin/collections/List<D>|): R|kotlin/Unit| {
lval <range>: R|kotlin/collections/List<D>| = R|<local>/list|
lval <iterator>: R|kotlin/collections/Iterator<D>| = R|<local>/<range>|.R|FakeOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<D>|>|()
while(R|<local>/<iterator>|.R|FakeOverride<kotlin/collections/Iterator.hasNext: R|kotlin/Boolean|>|()) {
lval <destruct>: R|D| = R|<local>/<iterator>|.R|FakeOverride<kotlin/collections/Iterator.next: R|D|>|()
lval x: R|kotlin/Int| = R|<local>/<destruct>|.R|/D.component1|()
lval y: R|kotlin/String| = R|<local>/<destruct>|.R|/D.component2|()
lval <iterator>: R|kotlin/collections/Iterator<D>| = D|R|<local>/<range>||.R|FakeOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<D>|>|()
while(D|R|<local>/<iterator>||.R|FakeOverride<kotlin/collections/Iterator.hasNext: R|kotlin/Boolean|>|()) {
lval <destruct>: R|D| = D|R|<local>/<iterator>||.R|FakeOverride<kotlin/collections/Iterator.next: R|D|>|()
lval x: R|kotlin/Int| = D|R|<local>/<destruct>||.R|/D.component1|()
lval y: R|kotlin/String| = D|R|<local>/<destruct>||.R|/D.component2|()
}
lval <destruct>: R|D| = R|<local>/list|.R|kotlin/collections/first|<R|D|>()
lval x: R|kotlin/Int| = R|<local>/<destruct>|.R|/D.component1|()
lval y: R|kotlin/String| = R|<local>/<destruct>|.R|/D.component2|()
R|<local>/list|.R|kotlin/collections/forEach|<R|D|>(<L> = forEach@fun <anonymous>(<destruct>: R|D|): R|kotlin/Unit| {
lval x: R|kotlin/Int| = R|<local>/<destruct>|.R|/D.component1|()
lval y: R|kotlin/String| = R|<local>/<destruct>|.R|/D.component2|()
lval <destruct>: R|D| = E|R|<local>/list||.R|kotlin/collections/first|<R|D|>()
lval x: R|kotlin/Int| = D|R|<local>/<destruct>||.R|/D.component1|()
lval y: R|kotlin/String| = D|R|<local>/<destruct>||.R|/D.component2|()
E|R|<local>/list||.R|kotlin/collections/forEach|<R|D|>(<L> = forEach@fun <anonymous>(<destruct>: R|D|): R|kotlin/Unit| {
lval x: R|kotlin/Int| = D|R|<local>/<destruct>||.R|/D.component1|()
lval y: R|kotlin/String| = D|R|<local>/<destruct>||.R|/D.component2|()
R|kotlin/io/println|(R|<local>/x|)
R|kotlin/io/println|(R|<local>/y|)
}
@@ -18,7 +18,7 @@ FILE: factoryFunctionOverloads.kt
, R|<local>/flag|)
}
public final fun A(c: R|C|, flag: R|kotlin/Boolean| = Boolean(true)): R|A| {
^A R|/A.A|(R|<local>/c|.R|/C.b|, R|<local>/flag|)
^A R|/A.A|(D|R|<local>/c||.R|/C.b|, R|<local>/flag|)
}
public final class A : R|kotlin/Any| {
public constructor(b: R|B|, flag: R|kotlin/Boolean| = Boolean(true)): R|A| {
+2 -2
View File
@@ -18,7 +18,7 @@ FILE: hashSet.kt
public final fun foo(): R|kotlin/Unit| {
lvar c: R|kotlin/collections/MutableSet<kotlin/String>?| = Null(null)
R|<local>/c| = R|java/util/HashSet.HashSet|<R|kotlin/String|>()
when (lval <bangbang>: R|kotlin/collections/MutableSet<kotlin/String>?| = R|<local>/c|) {
E|when (lval <bangbang>: R|kotlin/collections/MutableSet<kotlin/String>?| = R|<local>/c|) {
==($subj$, Null(null)) -> {
throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()
}
@@ -26,5 +26,5 @@ FILE: hashSet.kt
R|<local>/<bangbang>|!
}
}
.R|/d| = R|/produce|<R|T?|>()
|.R|/d| = R|/produce|<R|T?|>()
}
@@ -30,16 +30,16 @@ FILE: implicitReceiverOrder.kt
public final fun test(a: R|A|, b: R|B|): R|kotlin/Unit| {
R|kotlin/with|<R|B|, R|kotlin/Int|>(R|<local>/b|, <L> = with@fun R|B|.<anonymous>(it: R|B|): R|kotlin/Unit| {
R|kotlin/with|<R|A|, R|kotlin/Int|>(R|<local>/a|, <L> = with@fun R|A|.<anonymous>(it: R|A|): R|kotlin/Unit| {
R|/A.foo|()
R|/B.bar|()
D|this@R|/A||.R|/A.foo|()
D|this@R|/B||E|this@R|special/anonymous||.R|/B.bar|()
}
)
}
)
R|kotlin/with|<R|A|, R|kotlin/Int|>(R|<local>/a|, <L> = with@fun R|A|.<anonymous>(it: R|A|): R|kotlin/Unit| {
R|kotlin/with|<R|B|, R|kotlin/Int|>(R|<local>/b|, <L> = with@fun R|B|.<anonymous>(it: R|B|): R|kotlin/Unit| {
R|/B.foo|()
R|/A.bar|()
D|this@R|/B||.R|/B.foo|()
D|this@R|/A||E|this@R|special/anonymous||.R|/A.bar|()
}
)
}
+5 -5
View File
@@ -1,13 +1,13 @@
FILE: mapList.kt
public final fun main(): R|kotlin/Unit| {
lval x: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/emptyList|<R|kotlin/Int|>()
lval u: R|kotlin/collections/List<kotlin/Int>| = R|<local>/x|.R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| {
R|<local>/it|.R|kotlin/Int.plus|(R|<local>/it|)
lval u: R|kotlin/collections/List<kotlin/Int>| = E|R|<local>/x||.R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| {
D|R|<local>/it||.R|kotlin/Int.plus|(R|<local>/it|)
}
)
R|<local>/u|.R|/applyX|<R|kotlin/collections/List<kotlin/Int>|>(<L> = applyX@fun R|kotlin/collections/List<kotlin/Int>|.<anonymous>(it: R|kotlin/collections/List<kotlin/Int>|): R|kotlin/Unit| {
this@R|special/anonymous|.R|FakeOverride<kotlin/collections/List.contains: R|kotlin/Boolean|>|(Int(1))
R|FakeOverride<kotlin/collections/List.contains: R|kotlin/Boolean|>|(Int(1))
E|R|<local>/u||.R|/applyX|<R|kotlin/collections/List<kotlin/Int>|>(<L> = applyX@fun R|kotlin/collections/List<kotlin/Int>|.<anonymous>(it: R|kotlin/collections/List<kotlin/Int>|): R|kotlin/Unit| {
D|this@R|special/anonymous||.R|FakeOverride<kotlin/collections/List.contains: R|kotlin/Boolean|>|(Int(1))
D|this@R|kotlin/collections/List||.R|FakeOverride<kotlin/collections/List.contains: R|kotlin/Boolean|>|(Int(1))
}
)
}
@@ -27,9 +27,9 @@ FILE: multipleImplicitReceivers.kt
public final fun test(fooImpl: R|IFoo|, invokeImpl: R|IInvoke|): R|kotlin/Unit| {
R|kotlin/with|<R|A|, R|kotlin/Int|>(Q|A|, <L> = with@fun R|A|.<anonymous>(it: R|A|): R|kotlin/Unit| {
R|kotlin/with|<R|IFoo|, R|kotlin/Int|>(R|<local>/fooImpl|, <L> = with@fun R|IFoo|.<anonymous>(it: R|IFoo|): R|kotlin/Unit| {
R|/IFoo.foo|
D|this@R|/IFoo||E|this@R|special/anonymous||.R|/IFoo.foo|
R|kotlin/with|<R|IInvoke|, R|kotlin/Int|>(R|<local>/invokeImpl|, <L> = with@fun R|IInvoke|.<anonymous>(it: R|IInvoke|): R|kotlin/Unit| {
R|/IFoo.foo|.R|/IInvoke.invoke|()
D|this@R|/IInvoke||E|R|/IFoo.foo||.R|/IInvoke.invoke|()
}
)
}
@@ -4,20 +4,20 @@ FILE: recursiveBug.kt
super<R|kotlin/Any|>()
}
public final val result: R|kotlin/String| = R|kotlin/run|<R|Foo|, R|kotlin/String|>(<L> = run@fun R|Foo|.<anonymous>(it: R|Foo|): R|kotlin/String| {
R|<local>/name|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/String|>|()
public final val result: R|kotlin/String| = E|this@R|/Foo||.R|kotlin/run|<R|Foo|, R|kotlin/String|>(<L> = run@fun R|Foo|.<anonymous>(it: R|Foo|): R|kotlin/String| {
D|R|<local>/name||.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/String|>|()
}
)
public get(): R|kotlin/String|
public final val name: R|kotlin/Int| = R|/Foo.result|.R|kotlin/String.length|
public final val name: R|kotlin/Int| = D|D|this@R|/Foo||.R|/Foo.result||.R|kotlin/String.length|
public get(): R|kotlin/Int|
}
public final fun bar(name: R|kotlin/Function0<kotlin/String>|): R|kotlin/Unit| {
lval result: R|kotlin/String| = R|kotlin/run|<R|kotlin/String|>(<L> = run@fun <anonymous>(): R|kotlin/String| {
R|<local>/name|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/String|>|()
D|R|<local>/name||.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/String|>|()
}
)
lval name: R|kotlin/Int| = R|<local>/result|.R|kotlin/String.length|
lval name: R|kotlin/Int| = D|R|<local>/result||.R|kotlin/String.length|
}
@@ -1,5 +1,5 @@
FILE: reflectionClass.kt
public final val javaClass: R|java/lang/Class<kotlin/String>| = <getClass>(Q|kotlin/String|).R|kotlin/jvm/java|
public final val javaClass: R|java/lang/Class<kotlin/String>| = E|<getClass>(Q|kotlin/String|)|.R|kotlin/jvm/java|
public get(): R|java/lang/Class<kotlin/String>|
public final val kotlinClass: R|kotlin/reflect/KClass<kotlin/String>| = <getClass>(Q|kotlin/String|)
public get(): R|kotlin/reflect/KClass<kotlin/String>|
@@ -8,7 +8,7 @@ FILE: simpleDelegateProvider.kt
public get(): R|kotlin/String|
public final operator fun getValue(thisRef: R|kotlin/Any?|, property: R|kotlin/Any?|): R|kotlin/String| {
^getValue R|/Delegate.value|
^getValue D|this@R|/Delegate||.R|/Delegate.value|
}
}
@@ -21,11 +21,11 @@ FILE: simpleDelegateProvider.kt
public get(): R|kotlin/String|
public final operator fun provideDelegate(thisRef: R|kotlin/Any?|, property: R|kotlin/Any?|): R|Delegate| {
^provideDelegate R|/Delegate.Delegate|(R|/DelegateProvider.value|)
^provideDelegate R|/Delegate.Delegate|(D|this@R|/DelegateProvider||.R|/DelegateProvider.value|)
}
}
public final val testTopLevel: R|kotlin/String|by R|/DelegateProvider.DelegateProvider|(String(OK)).R|/DelegateProvider.provideDelegate|(Null(null), ::R|/testTopLevel|)
public final val testTopLevel: R|kotlin/String|by D|R|/DelegateProvider.DelegateProvider|(String(OK))|.R|/DelegateProvider.provideDelegate|(Null(null), ::R|/testTopLevel|)
public get(): R|kotlin/String| {
^ D|/testTopLevel|.R|/Delegate.getValue|(Null(null), ::R|/testTopLevel|)
^ D|D|/testTopLevel||.R|/Delegate.getValue|(Null(null), ::R|/testTopLevel|)
}
@@ -4,13 +4,13 @@ FILE: simpleLazy.kt
}
)
public get(): R|kotlin/String| {
^ D|/x|.R|kotlin/getValue|<R|kotlin/String|>(Null(null), ::R|/x|)
^ E|D|/x||.R|kotlin/getValue|<R|kotlin/String|>(Null(null), ::R|/x|)
}
public final fun foo(): R|kotlin/Unit| {
R|/x|.R|kotlin/String.length|
D|R|/x||.R|kotlin/String.length|
lval y: R|kotlin/String|by R|kotlin/lazy|<R|kotlin/String|>(<L> = lazy@fun <anonymous>(): R|kotlin/String| {
String(Bye)
}
)
R|<local>/y|.R|kotlin/String.length|
D|R|<local>/y||.R|kotlin/String.length|
}
@@ -1,43 +1,43 @@
FILE: topLevelResolve.kt
public final fun testPlus(): R|kotlin/Unit| {
lval x: R|kotlin/Int| = Int(1).R|kotlin/Int.plus|(Int(2))
lval y: R|kotlin/Double| = Double(3.0).R|kotlin/Double.plus|(Double(4.0))
lval z: R|kotlin/Double| = Int(5).R|kotlin/Int.plus|(Double(6.0))
lval w: R|kotlin/Double| = Double(7.0).R|kotlin/Double.plus|(Int(8))
lval c: R|kotlin/Char| = Char(a).R|kotlin/Char.plus|(Int(1))
lval s: R|kotlin/String| = String(.).R|kotlin/String.plus|(String(..))
lval ss: R|kotlin/String| = String().R|kotlin/String.plus|(Int(1))
lval list: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(1), Int(2), Int(3)).R|kotlin/collections/plus|<R|kotlin/Int|>(Int(4))
lval listAndList: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(4), Int(5), Int(6)).R|kotlin/collections/plus|<R|kotlin/Int|>(R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(7), Int(8)))
lval mutableList: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/mutableListOf|<R|kotlin/Int|>(Int(9), Int(10)).R|kotlin/collections/plus|<R|kotlin/Int|>(R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(11), Int(12), Int(13)))
lval setAndList: R|kotlin/collections/Set<kotlin/Int>| = R|kotlin/collections/setOf|<R|kotlin/Int|>(Int(0)).R|kotlin/collections/plus|<R|kotlin/Int|>(R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(1), Int(2)))
lval stringAndList: R|kotlin/String| = String().R|kotlin/String.plus|(R|kotlin/collections/emptyList|<R|kotlin/Boolean|>())
lval map: R|kotlin/collections/Map<kotlin/String, kotlin/Int>| = R|kotlin/collections/mapOf|<R|kotlin/String|, R|kotlin/Int|>(String().R|kotlin/to|<R|kotlin/String|, R|kotlin/Int|>(Int(1)), String(.).R|kotlin/to|<R|kotlin/String|, R|kotlin/Int|>(Int(2))).R|kotlin/collections/plus|<R|kotlin/String|, R|kotlin/Int|>(String(..).R|kotlin/to|<R|kotlin/String|, R|kotlin/Int|>(Int(3)))
lval mapAndMap: R|kotlin/collections/Map<kotlin/String, kotlin/Int>| = R|kotlin/collections/mapOf|<R|kotlin/String|, R|kotlin/Int|>(String(-).R|kotlin/to|<R|kotlin/String|, R|kotlin/Int|>(Int(4))).R|kotlin/collections/plus|<R|kotlin/String|, R|kotlin/Int|>(R|kotlin/collections/mapOf|<R|kotlin/String|, R|kotlin/Int|>(String(_).R|kotlin/to|<R|kotlin/String|, R|kotlin/Int|>(Int(5))))
lval x: R|kotlin/Int| = D|Int(1)|.R|kotlin/Int.plus|(Int(2))
lval y: R|kotlin/Double| = D|Double(3.0)|.R|kotlin/Double.plus|(Double(4.0))
lval z: R|kotlin/Double| = D|Int(5)|.R|kotlin/Int.plus|(Double(6.0))
lval w: R|kotlin/Double| = D|Double(7.0)|.R|kotlin/Double.plus|(Int(8))
lval c: R|kotlin/Char| = D|Char(a)|.R|kotlin/Char.plus|(Int(1))
lval s: R|kotlin/String| = D|String(.)|.R|kotlin/String.plus|(String(..))
lval ss: R|kotlin/String| = D|String()|.R|kotlin/String.plus|(Int(1))
lval list: R|kotlin/collections/List<kotlin/Int>| = E|R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(1), Int(2), Int(3))|.R|kotlin/collections/plus|<R|kotlin/Int|>(Int(4))
lval listAndList: R|kotlin/collections/List<kotlin/Int>| = E|R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(4), Int(5), Int(6))|.R|kotlin/collections/plus|<R|kotlin/Int|>(R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(7), Int(8)))
lval mutableList: R|kotlin/collections/List<kotlin/Int>| = E|R|kotlin/collections/mutableListOf|<R|kotlin/Int|>(Int(9), Int(10))|.R|kotlin/collections/plus|<R|kotlin/Int|>(R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(11), Int(12), Int(13)))
lval setAndList: R|kotlin/collections/Set<kotlin/Int>| = E|R|kotlin/collections/setOf|<R|kotlin/Int|>(Int(0))|.R|kotlin/collections/plus|<R|kotlin/Int|>(R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(1), Int(2)))
lval stringAndList: R|kotlin/String| = D|String()|.R|kotlin/String.plus|(R|kotlin/collections/emptyList|<R|kotlin/Boolean|>())
lval map: R|kotlin/collections/Map<kotlin/String, kotlin/Int>| = E|R|kotlin/collections/mapOf|<R|kotlin/String|, R|kotlin/Int|>(E|String()|.R|kotlin/to|<R|kotlin/String|, R|kotlin/Int|>(Int(1)), E|String(.)|.R|kotlin/to|<R|kotlin/String|, R|kotlin/Int|>(Int(2)))|.R|kotlin/collections/plus|<R|kotlin/String|, R|kotlin/Int|>(E|String(..)|.R|kotlin/to|<R|kotlin/String|, R|kotlin/Int|>(Int(3)))
lval mapAndMap: R|kotlin/collections/Map<kotlin/String, kotlin/Int>| = E|R|kotlin/collections/mapOf|<R|kotlin/String|, R|kotlin/Int|>(E|String(-)|.R|kotlin/to|<R|kotlin/String|, R|kotlin/Int|>(Int(4)))|.R|kotlin/collections/plus|<R|kotlin/String|, R|kotlin/Int|>(R|kotlin/collections/mapOf|<R|kotlin/String|, R|kotlin/Int|>(E|String(_)|.R|kotlin/to|<R|kotlin/String|, R|kotlin/Int|>(Int(5))))
}
public final fun <T> id(arg: R|T|): R|T| {
^id R|<local>/arg|
}
public final fun testMap(): R|kotlin/Unit| {
lval first: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(1), Int(2), Int(3)).R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| {
R|<local>/it|.R|kotlin/Int.times|(Int(2))
lval first: R|kotlin/collections/List<kotlin/Int>| = E|R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(1), Int(2), Int(3))|.R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| {
D|R|<local>/it||.R|kotlin/Int.times|(Int(2))
}
)
lval second: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/intArrayOf|(Int(4), Int(5), Int(6)).R|kotlin/collections/map|<R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| {
R|<local>/it|.R|kotlin/Int.times|(Int(2))
lval second: R|kotlin/collections/List<kotlin/Int>| = E|R|kotlin/intArrayOf|(Int(4), Int(5), Int(6))|.R|kotlin/collections/map|<R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| {
D|R|<local>/it||.R|kotlin/Int.times|(Int(2))
}
)
lval withId: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(1), Int(2), Int(3)).R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| {
lval withId: R|kotlin/collections/List<kotlin/Int>| = E|R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(1), Int(2), Int(3))|.R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| {
R|/id|<R|kotlin/Int|>(R|<local>/it|)
}
)
lval stringToInt: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/listOf|<R|kotlin/String|>(String(alpha), String(omega)).R|kotlin/collections/map|<R|kotlin/String|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/String|): R|kotlin/Int| {
R|<local>/it|.R|kotlin/String.length|
lval stringToInt: R|kotlin/collections/List<kotlin/Int>| = E|R|kotlin/collections/listOf|<R|kotlin/String|>(String(alpha), String(omega))|.R|kotlin/collections/map|<R|kotlin/String|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/String|): R|kotlin/Int| {
D|R|<local>/it||.R|kotlin/String.length|
}
)
lval viaWith: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/with|<R|kotlin/collections/List<kotlin/Int>|, R|kotlin/collections/List<kotlin/Int>|>(R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(42)), <L> = with@fun R|kotlin/collections/List<kotlin/Int>|.<anonymous>(it: R|kotlin/collections/List<kotlin/Int>|): R|kotlin/collections/List<kotlin/Int>| {
R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| {
R|<local>/it|.R|kotlin/Int.times|(R|<local>/it|)
E|this@R|special/anonymous||.R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/Int|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Int| {
D|R|<local>/it||.R|kotlin/Int.times|(R|<local>/it|)
}
)
}
@@ -45,12 +45,12 @@ FILE: topLevelResolve.kt
}
public final fun testWith(): R|kotlin/Unit| {
lval length: R|kotlin/Int| = R|kotlin/with|<R|kotlin/String|, R|kotlin/Int|>(String(), <L> = with@fun R|kotlin/String|.<anonymous>(it: R|kotlin/String|): R|kotlin/Int| {
R|kotlin/String.length|
D|this@R|kotlin/String||.R|kotlin/String.length|
}
)
lval indices: R|kotlin/ranges/IntRange| = R|kotlin/with|<R|kotlin/String|, R|kotlin/ranges/IntRange|>(String(), <L> = with@fun R|kotlin/String|.<anonymous>(it: R|kotlin/String|): R|kotlin/ranges/IntRange| {
R|kotlin/text/indices|
E|this@R|special/anonymous||.R|kotlin/text/indices|
}
)
lval indicesNoWith: R|kotlin/ranges/IntRange| = String().R|kotlin/text/indices|
lval indicesNoWith: R|kotlin/ranges/IntRange| = E|String()|.R|kotlin/text/indices|
}
@@ -1,5 +1,5 @@
FILE: typeAliasDeserialization.kt
public final fun main(): R|kotlin/Unit| {
lval a: R|java/util/LinkedHashSet<kotlin/String>| = R|java/util/LinkedHashSet.LinkedHashSet|<R|kotlin/String|>()
R|<local>/a|.R|FakeOverride<java/util/HashSet.add: R|kotlin/Boolean|>|(String())
D|R|<local>/a||.R|FakeOverride<java/util/HashSet.add: R|kotlin/Boolean|>|(String())
}
@@ -12,10 +12,10 @@ FILE: unaryOperators.kt
public final fun foo(u: R|U|): R|kotlin/Unit| {
lval b: R|kotlin/Boolean| = Boolean(false)
lval i: R|kotlin/Int| = Int(10)
lval x: R|kotlin/Int| = R|<local>/i|.R|kotlin/Int.unaryMinus|()
lval y: R|kotlin/Boolean| = R|<local>/b|.R|kotlin/Boolean.not|()
lval z: R|kotlin/Double| = Double(1.0).R|kotlin/Double.unaryMinus|()
lval w: R|kotlin/Int| = R|<local>/i|.R|kotlin/Int.unaryPlus|()
lval g: R|kotlin/Boolean| = R|<local>/u|.R|/U.contains|(String()).R|kotlin/Boolean.not|()
lval x: R|kotlin/Int| = D|R|<local>/i||.R|kotlin/Int.unaryMinus|()
lval y: R|kotlin/Boolean| = D|R|<local>/b||.R|kotlin/Boolean.not|()
lval z: R|kotlin/Double| = D|Double(1.0)|.R|kotlin/Double.unaryMinus|()
lval w: R|kotlin/Int| = D|R|<local>/i||.R|kotlin/Int.unaryPlus|()
lval g: R|kotlin/Boolean| = D|D|R|<local>/u||.R|/U.contains|(String())|.R|kotlin/Boolean.not|()
lval f: R|kotlin/Boolean| = (String() !is R|kotlin/Boolean|)
}
@@ -22,31 +22,31 @@ FILE: typeAliasWithTypeArguments.kt
public final typealias Inv2<X, Y> = R|Inv<X, Y>|
public final typealias Inv3<X, Y, Z> = R|Inv<X, Z>|
public final fun testBase(inv: R|Inv<A, B>|): R|kotlin/Unit| {
R|<local>/inv|.R|FakeOverride</Inv.k: R|A|>|()
R|<local>/inv|.R|FakeOverride</Inv.t: R|B|>|()
D|R|<local>/inv||.R|FakeOverride</Inv.k: R|A|>|()
D|R|<local>/inv||.R|FakeOverride</Inv.t: R|B|>|()
}
public final fun test_0(inv: R|Inv0|): R|kotlin/Unit| {
R|<local>/inv|.R|FakeOverride</Inv.k: R|A|>|().R|/A.foo|()
R|<local>/inv|.R|FakeOverride</Inv.t: R|B|>|().R|/B.bar|()
D|D|R|<local>/inv||.R|FakeOverride</Inv.k: R|A|>|()|.R|/A.foo|()
D|D|R|<local>/inv||.R|FakeOverride</Inv.t: R|B|>|()|.R|/B.bar|()
}
public final fun test_1(inv: R|Inv1<B>|): R|kotlin/Unit| {
R|<local>/inv|.R|FakeOverride</Inv.k: R|A|>|().R|/A.foo|()
R|<local>/inv|.R|FakeOverride</Inv.t: R|B|>|().R|/B.bar|()
D|D|R|<local>/inv||.R|FakeOverride</Inv.k: R|A|>|()|.R|/A.foo|()
D|D|R|<local>/inv||.R|FakeOverride</Inv.t: R|B|>|()|.R|/B.bar|()
}
public final fun test_2(inv: R|Inv2<A, B>|): R|kotlin/Unit| {
R|<local>/inv|.R|FakeOverride</Inv.k: R|A|>|().R|/A.foo|()
R|<local>/inv|.R|FakeOverride</Inv.t: R|B|>|().R|/B.bar|()
D|D|R|<local>/inv||.R|FakeOverride</Inv.k: R|A|>|()|.R|/A.foo|()
D|D|R|<local>/inv||.R|FakeOverride</Inv.t: R|B|>|()|.R|/B.bar|()
}
public final fun test_3(inv: R|Inv3<A, B, C>|): R|kotlin/Unit| {
R|<local>/inv|.R|FakeOverride</Inv.k: R|A|>|().R|/A.foo|()
R|<local>/inv|.R|FakeOverride</Inv.t: R|C|>|().<Unresolved name: bar>#()
R|<local>/inv|.R|FakeOverride</Inv.t: R|C|>|().R|/C.baz|()
D|D|R|<local>/inv||.R|FakeOverride</Inv.k: R|A|>|()|.R|/A.foo|()
D|R|<local>/inv||.R|FakeOverride</Inv.t: R|C|>|().<Unresolved name: bar>#()
D|D|R|<local>/inv||.R|FakeOverride</Inv.t: R|C|>|()|.R|/C.baz|()
}
public final typealias Inv02<A1, B1, C1> = R|Inv<Inv<A1, B1>, C1>|
public final fun test_4(inv: R|Inv02<A, B, C>|): R|kotlin/Unit| {
R|<local>/inv|.R|FakeOverride</Inv.k: R|Inv<A, B>|>|().R|FakeOverride</Inv.k: R|A|>|().R|/A.foo|()
R|<local>/inv|.R|FakeOverride</Inv.k: R|Inv<A, B>|>|().R|FakeOverride</Inv.t: R|B|>|().R|/B.bar|()
R|<local>/inv|.R|FakeOverride</Inv.t: R|C|>|().R|/C.baz|()
D|D|D|R|<local>/inv||.R|FakeOverride</Inv.k: R|Inv<A, B>|>|()|.R|FakeOverride</Inv.k: R|A|>|()|.R|/A.foo|()
D|D|D|R|<local>/inv||.R|FakeOverride</Inv.k: R|Inv<A, B>|>|()|.R|FakeOverride</Inv.t: R|B|>|()|.R|/B.bar|()
D|D|R|<local>/inv||.R|FakeOverride</Inv.t: R|C|>|()|.R|/C.baz|()
}
public abstract interface In<in T> : R|kotlin/Any| {
public abstract fun take(x: R|T|): R|kotlin/Unit|
@@ -66,20 +66,20 @@ FILE: typeAliasWithTypeArguments.kt
public final typealias Out1<X> = R|Out<X>|
public final typealias Invariant1<X> = R|Invariant<X>|
public final fun test_5(a: R|A|, in1: R|In1<A>|, in2: R|In1<in A>|, in3: R|In1<out A>|): R|kotlin/Unit| {
R|<local>/in1|.R|FakeOverride</In.take: R|kotlin/Unit|>|(R|<local>/a|)
R|<local>/in2|.R|FakeOverride</In.take: R|kotlin/Unit|>|(R|<local>/a|)
R|<local>/in3|.R|FakeOverride</In.take: R|kotlin/Unit|>|(R|<local>/a|)
D|R|<local>/in1||.R|FakeOverride</In.take: R|kotlin/Unit|>|(R|<local>/a|)
D|R|<local>/in2||.R|FakeOverride</In.take: R|kotlin/Unit|>|(R|<local>/a|)
D|R|<local>/in3||.R|FakeOverride</In.take: R|kotlin/Unit|>|(R|<local>/a|)
}
public final fun test_6(a: R|A|, out1: R|Out1<A>|, out2: R|Out1<in A>|, out3: R|Out1<out A>|): R|kotlin/Unit| {
R|<local>/out1|.R|FakeOverride</Out.value: R|A|>|().R|/A.foo|()
R|<local>/out2|.R|FakeOverride</Out.value: R|A|>|().R|/A.foo|()
R|<local>/out3|.R|FakeOverride</Out.value: R|A|>|().R|/A.foo|()
D|D|R|<local>/out1||.R|FakeOverride</Out.value: R|A|>|()|.R|/A.foo|()
D|D|R|<local>/out2||.R|FakeOverride</Out.value: R|A|>|()|.R|/A.foo|()
D|D|R|<local>/out3||.R|FakeOverride</Out.value: R|A|>|()|.R|/A.foo|()
}
public final fun test_7(a: R|A|, inv1: R|Invariant1<A>|, inv2: R|Invariant1<in A>|, inv3: R|Invariant1<out A>|): R|kotlin/Unit| {
R|<local>/inv1|.R|FakeOverride</Invariant.value: R|A|>|().R|/A.foo|()
R|<local>/inv2|.R|FakeOverride</Invariant.value: R|A|>|().R|/A.foo|()
R|<local>/inv3|.R|FakeOverride</Invariant.value: R|A|>|().R|/A.foo|()
R|<local>/inv1|.R|FakeOverride</Invariant.take: R|kotlin/Unit|>|(R|<local>/a|)
R|<local>/inv2|.R|FakeOverride</Invariant.take: R|kotlin/Unit|>|(R|<local>/a|)
R|<local>/inv3|.R|FakeOverride</Invariant.take: R|kotlin/Unit|>|(R|<local>/a|)
D|D|R|<local>/inv1||.R|FakeOverride</Invariant.value: R|A|>|()|.R|/A.foo|()
D|D|R|<local>/inv2||.R|FakeOverride</Invariant.value: R|A|>|()|.R|/A.foo|()
D|D|R|<local>/inv3||.R|FakeOverride</Invariant.value: R|A|>|()|.R|/A.foo|()
D|R|<local>/inv1||.R|FakeOverride</Invariant.take: R|kotlin/Unit|>|(R|<local>/a|)
D|R|<local>/inv2||.R|FakeOverride</Invariant.take: R|kotlin/Unit|>|(R|<local>/a|)
D|R|<local>/inv3||.R|FakeOverride</Invariant.take: R|kotlin/Unit|>|(R|<local>/a|)
}
@@ -20,6 +20,10 @@ interface FirQualifiedAccess : FirResolvable {
fun <D> transformCalleeReference(transformer: FirTransformer<D>, data: D): FirQualifiedAccess
fun <D> transformDispatchReceiver(transformer: FirTransformer<D>, data: D): FirQualifiedAccess
fun <D> transformExtensionReceiver(transformer: FirTransformer<D>, data: D): FirQualifiedAccess
override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R =
visitor.visitQualifiedAccess(this, data)
@@ -27,6 +27,14 @@ class FirComponentCallImpl(
return this
}
override fun <D> transformDispatchReceiver(transformer: FirTransformer<D>, data: D): FirQualifiedAccess {
return this
}
override fun <D> transformExtensionReceiver(transformer: FirTransformer<D>, data: D): FirQualifiedAccess {
return this
}
override var calleeReference: FirNamedReference =
FirSimpleNamedReference(psi, Name.identifier("component$componentIndex"))
@@ -42,6 +42,14 @@ class FirDelegatedConstructorCallImpl(
return this
}
override fun <D> transformDispatchReceiver(transformer: FirTransformer<D>, data: D): FirQualifiedAccess {
return this
}
override fun <D> transformExtensionReceiver(transformer: FirTransformer<D>, data: D): FirQualifiedAccess {
return this
}
override var typeRef: FirTypeRef = FirImplicitUnitTypeRef(psi)
override fun replaceTypeRef(newTypeRef: FirTypeRef) {}
@@ -20,6 +20,14 @@ interface FirModifiableQualifiedAccess<C : FirReference> : FirQualifiedAccess {
override var explicitReceiver: FirExpression?
override var dispatchReceiver: FirExpression
get() = super.dispatchReceiver
set(_) {}
override var extensionReceiver: FirExpression
get() = super.extensionReceiver
set(_) {}
override fun <D> transformCalleeReference(transformer: FirTransformer<D>, data: D): FirQualifiedAccess {
calleeReference = calleeReference.transformSingle(transformer, data)
return this
@@ -29,4 +37,14 @@ interface FirModifiableQualifiedAccess<C : FirReference> : FirQualifiedAccess {
explicitReceiver = explicitReceiver?.transformSingle(transformer, data)
return this
}
override fun <D> transformDispatchReceiver(transformer: FirTransformer<D>, data: D): FirQualifiedAccess {
dispatchReceiver = dispatchReceiver.transformSingle(transformer, data)
return this
}
override fun <D> transformExtensionReceiver(transformer: FirTransformer<D>, data: D): FirQualifiedAccess {
extensionReceiver = extensionReceiver.transformSingle(transformer, data)
return this
}
}
@@ -0,0 +1,15 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.fir.references
import org.jetbrains.kotlin.fir.FirAbstractElement
import org.jetbrains.kotlin.fir.FirThisReference
import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol
class FirImplicitThisReference(override val boundSymbol: AbstractFirBasedSymbol<*>) : FirAbstractElement(null), FirThisReference {
override val labelName: String?
get() = null
}
+1 -1
View File
@@ -1 +1 @@
R|elvis/WithElvis.value|
D|this@R|elvis/WithElvis||.R|elvis/WithElvis.value|
+1 -1
View File
@@ -1 +1 @@
R|/Foo.x| = Int(42)
D|this@R|/Foo||.R|/Foo.x| = Int(42)
+1 -1
View File
@@ -1 +1 @@
R|/Foo.x| = Int(42)
D|this@R|/Foo||.R|/Foo.x| = Int(42)
+1 -1
View File
@@ -8,5 +8,5 @@ FILE: main.kt
lval y: <implicit> = Double(2.0)
}
public final fun bar(x: R|kotlin/Int|, y: R|kotlin/Int|): R|kotlin/Int| {
^bar R|<local>/x|.R|kotlin/Int.plus|(R|<local>/y|)
^bar D|R|<local>/x||.R|kotlin/Int.plus|(R|<local>/y|)
}
@@ -1,4 +1,4 @@
FILE: user.kt
public final fun foo(hello: R|hello/Hello|): R|kotlin/String| {
^foo R|<local>/hello|.R|hello/Hello.msg|
^foo D|R|<local>/hello||.R|hello/Hello.msg|
}
@@ -5,8 +5,8 @@ FILE: jvm.kt
}
public final fun test(): R|kotlin/Unit| {
lval x: R|kotlin/String| = R|/Annotated.foo|(String(123))
lval y: R|kotlin/String| = R|/Annotated.foo|(Null(null))
lval x: R|kotlin/String| = D|this@R|/Annotated||.R|/Annotated.foo|(String(123))
lval y: R|kotlin/String| = D|this@R|/Annotated||.R|/Annotated.foo|(Null(null))
}
}
@@ -5,8 +5,8 @@ FILE: jvm.kt
}
public final fun test(): R|kotlin/Unit| {
lval x: R|kotlin/String| = R|/AnnotatedDerived.foo|(String(123))
lval y: R|kotlin/String| = R|/AnnotatedDerived.foo|(Null(null))
lval x: R|kotlin/String| = D|this@R|/AnnotatedDerived||.R|/AnnotatedDerived.foo|(String(123))
lval y: R|kotlin/String| = D|this@R|/AnnotatedDerived||.R|/AnnotatedDerived.foo|(Null(null))
}
}
@@ -11,7 +11,7 @@ FILE: simpleFakeOverride.kt
}
public final fun test(): R|kotlin/Unit| {
R|FakeOverride</A.foo: R|ft<Some, Some?>!|>|(R|/Some.Some|())
D|this@R|/A||.R|FakeOverride</A.foo: R|ft<Some, Some?>!|>|(R|/Some.Some|())
}
}
@@ -5,9 +5,9 @@ FILE: jvm.kt
}
public final fun test(): R|kotlin/Unit| {
lval res1: R|kotlin/Boolean| = R|/Some.foo|(Int(1))
lval res2: R|kotlin/Boolean| = R|/Some.foo|(Int(1).R|kotlin/Int.unaryMinus|())
lval res3: R|kotlin/Array<ft<kotlin/String, kotlin/String?>!>| = R|/Some.bar|(R|kotlin/intArrayOf|(Int(0), Int(2), Int(2).R|kotlin/Int.unaryMinus|()))
lval res1: R|kotlin/Boolean| = D|this@R|/Some||.R|/Some.foo|(Int(1))
lval res2: R|kotlin/Boolean| = D|this@R|/Some||.R|/Some.foo|(D|Int(1)|.R|kotlin/Int.unaryMinus|())
lval res3: R|kotlin/Array<ft<kotlin/String, kotlin/String?>!>| = D|this@R|/Some||.R|/Some.bar|(R|kotlin/intArrayOf|(Int(0), Int(2), D|Int(2)|.R|kotlin/Int.unaryMinus|()))
}
}
@@ -1,8 +1,8 @@
FILE: Test.kt
public final fun test(): R|kotlin/Unit| {
lval jc: R|JavaClass| = R|/JavaClass.JavaClass|()
lval result: R|ft<kotlin/String, kotlin/String?>!| = R|<local>/jc|.R|/JavaClass.text|
lval result: R|ft<kotlin/String, kotlin/String?>!| = D|R|<local>/jc||.R|/JavaClass.text|
}
public final fun otherTest(jc: R|JavaClass|): R|kotlin/Unit| {
lval result: R|ft<kotlin/String, kotlin/String?>!| = R|<local>/jc|.R|/JavaClass.text|
lval result: R|ft<kotlin/String, kotlin/String?>!| = D|R|<local>/jc||.R|/JavaClass.text|
}
@@ -1,5 +1,5 @@
FILE: Test.kt
public final fun test(): R|kotlin/Unit| {
lval jc: R|JavaClass| = R|/JavaClass.JavaClass|()
lval result: R|kotlin/String| = R|<local>/jc|.R|/Derived.some|
lval result: R|kotlin/String| = D|R|<local>/jc||.R|/Derived.some|
}
@@ -5,7 +5,7 @@ FILE: Test.kt
}
public final fun test(): R|kotlin/Unit| {
R|/Inheritor.foo|(String(abc), Int(456))
D|this@R|/Inheritor||E|this@R|/Tester||.R|/Inheritor.foo|(String(abc), Int(456))
}
}
@@ -1,3 +1,3 @@
FILE: Test.kt
public final val x: R|ft<kotlin/String, kotlin/String?>!| = R|/JavaClass.JavaClass|().R|/JavaClass.foo|
public final val x: R|ft<kotlin/String, kotlin/String?>!| = D|R|/JavaClass.JavaClass|()|.R|/JavaClass.foo|
public get(): R|ft<kotlin/String, kotlin/String?>!|
@@ -23,7 +23,7 @@ FILE: common.kt
}
public open fun baz(arg: R|kotlin/CharSequence|): R|kotlin/String| {
^baz R|<local>/arg|.R|kotlin/Any.toString|()
^baz D|R|<local>/arg||.R|kotlin/Any.toString|()
}
}
+3 -3
View File
@@ -22,9 +22,9 @@ FILE: jvm.kt
}
public final fun test(): R|kotlin/Unit| {
R|FakeOverride</A.foo: R|kotlin/Unit|>|(String())
R|/C.bar|(String())
R|FakeOverride</A.baz: R|kotlin/String|>|(String())
D|this@R|/A||.R|FakeOverride</A.foo: R|kotlin/Unit|>|(String())
D|this@R|/C||.R|/C.bar|(String())
D|this@R|/A||.R|FakeOverride</A.baz: R|kotlin/String|>|(String())
}
}
+6 -6
View File
@@ -18,14 +18,14 @@ FILE: jvm.kt
}
public final fun useMember(): R|kotlin/Unit| {
R|/MyList.get|(Int(1))
R|/MyList.set|(Int(2), Int(3))
D|this@R|/MyList||.R|/MyList.get|(Int(1))
D|this@R|/MyList||.R|/MyList.set|(Int(2), Int(3))
}
}
public final fun useList(list: R|MyList|): R|kotlin/Unit| {
R|<local>/list|.R|/MyList.get|(Int(1))
R|<local>/list|.R|/MyList.set|(Int(2), Int(3))
D|R|<local>/list||.R|/MyList.get|(Int(1))
D|R|<local>/list||.R|/MyList.set|(Int(2), Int(3))
}
public final class DerivedWrapper : R|Wrapper| {
public constructor(): R|DerivedWrapper| {
@@ -33,8 +33,8 @@ FILE: jvm.kt
}
public final fun use(): R|kotlin/Unit| {
R|/Wrapper.list|.R|/MyList.get|(Int(1))
R|/Wrapper.list|.R|/MyList.set|(Int(2), Int(3))
D|D|this@R|/Wrapper||.R|/Wrapper.list||.R|/MyList.get|(Int(1))
D|D|this@R|/Wrapper||.R|/Wrapper.list||.R|/MyList.set|(Int(2), Int(3))
}
}
+4 -4
View File
@@ -17,8 +17,8 @@ FILE: jvm.kt
}
public final fun test(): R|kotlin/Unit| {
R|/A.foo|()
R|/A.bar|()
D|this@R|/A||.R|/A.foo|()
D|this@R|/A||.R|/A.bar|()
}
}
@@ -28,8 +28,8 @@ FILE: jvm.kt
}
public final fun test(): R|kotlin/Unit| {
R|/A.foo|()
R|/A.bar|()
D|this@R|/A||.R|/A.foo|()
D|this@R|/A||.R|/A.bar|()
}
}
+6 -6
View File
@@ -28,9 +28,9 @@ FILE: jvm.kt
}
public final fun test(): R|kotlin/Unit| {
R|/A.foo|()
R|/X.bar|()
R|/Y.baz|()
D|this@R|/A||.R|/A.foo|()
D|this@R|/X||.R|/X.bar|()
D|this@R|/Y||.R|/Y.baz|()
}
}
@@ -40,9 +40,9 @@ FILE: jvm.kt
}
public final fun test(): R|kotlin/Unit| {
R|/A.foo|()
R|/X.bar|()
R|/Y.baz|()
D|this@R|/A||.R|/A.foo|()
D|this@R|/X||.R|/X.bar|()
D|this@R|/Y||.R|/Y.baz|()
}
}
+4 -4
View File
@@ -5,16 +5,16 @@ FILE: B.kt
}
public final override fun foo(): R|B| {
^foo this#
^foo this@R|/B|
}
public final fun bar(): R|B| {
^bar this#
^bar this@R|/B|
}
public final fun test(): R|kotlin/Unit| {
R|/B.foo|()
R|/B.bar|()
D|this@R|/B||.R|/B.foo|()
D|this@R|/B||.R|/B.bar|()
}
}