[FIR] Let prefix inc/dec call getter twice for compatibility with K1

#KT-57179 Fixed
This commit is contained in:
Kirill Rakhman
2023-03-15 17:24:40 +01:00
committed by Space Team
parent fea344faa4
commit 45d2424ad8
50 changed files with 1391 additions and 794 deletions
@@ -705,9 +705,8 @@ internal class KtFirCallResolver(
val setPartiallyAppliedSymbol = fir.toPartiallyAppliedSymbol(arrayAccessExpression.arrayExpression) ?: return null
return when (incDecPrecedence) {
KtCompoundAccess.IncOrDecOperation.Precedence.PREFIX -> {
// For prefix case, the last argument is a reference to a synthetic local variable `<unary-result>` storing the result. So
// we find the inc or dec operation call from the initializer of this local variable.
val operationCall = getInitializerOfReferencedLocalVariable(lastArg) ?: return null
// For prefix case, the last argument is a call to get(...).inc().
val operationCall = lastArg as? FirFunctionCall ?: return null
val operationPartiallyAppliedSymbol = operationCall.toPartiallyAppliedSymbol(arrayAccessExpression) ?: return null
// The get call is the explicit receiver of this operation call
val getCall = operationCall.explicitReceiver as? FirFunctionCall ?: return null
@@ -711,6 +711,18 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
runTest("compiler/testData/diagnostics/tests/PackageQualified.kt");
}
@Test
@TestMetadata("prefixIncReturnType.kt")
public void testPrefixIncReturnType() throws Exception {
runTest("compiler/testData/diagnostics/tests/prefixIncReturnType.kt");
}
@Test
@TestMetadata("prefixIncSmartCast.kt")
public void testPrefixIncSmartCast() throws Exception {
runTest("compiler/testData/diagnostics/tests/prefixIncSmartCast.kt");
}
@Test
@TestMetadata("PrimaryConstructors.kt")
public void testPrimaryConstructors() throws Exception {
@@ -711,6 +711,18 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/PackageQualified.kt");
}
@Test
@TestMetadata("prefixIncReturnType.kt")
public void testPrefixIncReturnType() throws Exception {
runTest("compiler/testData/diagnostics/tests/prefixIncReturnType.kt");
}
@Test
@TestMetadata("prefixIncSmartCast.kt")
public void testPrefixIncSmartCast() throws Exception {
runTest("compiler/testData/diagnostics/tests/prefixIncSmartCast.kt");
}
@Test
@TestMetadata("PrimaryConstructors.kt")
public void testPrimaryConstructors() throws Exception {
@@ -711,6 +711,18 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/PackageQualified.kt");
}
@Test
@TestMetadata("prefixIncReturnType.kt")
public void testPrefixIncReturnType() throws Exception {
runTest("compiler/testData/diagnostics/tests/prefixIncReturnType.kt");
}
@Test
@TestMetadata("prefixIncSmartCast.kt")
public void testPrefixIncSmartCast() throws Exception {
runTest("compiler/testData/diagnostics/tests/prefixIncSmartCast.kt");
}
@Test
@TestMetadata("PrimaryConstructors.kt")
public void testPrimaryConstructors() throws Exception {
@@ -141,6 +141,12 @@ class ErrorNodeDiagnosticCollectorComponent(
// See FirForLoopChecker
return
}
// Prefix inc/dec on array access will have two calls to .get(...), don't report for the second one.
if (source.kind == KtFakeSourceElementKind.DesugaredPrefixSecondGetReference) {
return
}
for (coneDiagnostic in diagnostic.toFirDiagnostics(session, source, qualifiedAccessSource)) {
reporter.report(coneDiagnostic, context)
}
@@ -653,6 +653,13 @@ class Fir2IrVisitor(
return callGenerator.convertToIrSetCall(variableAssignment, explicitReceiverExpression)
}
override fun visitDesugaredAssignmentValueReferenceExpression(
desugaredAssignmentValueReferenceExpression: FirDesugaredAssignmentValueReferenceExpression,
data: Any?
): IrElement {
return desugaredAssignmentValueReferenceExpression.expressionRef.value.accept(this, null)
}
override fun <T> visitConstExpression(constExpression: FirConstExpression<T>, data: Any?): IrElement {
return constExpression.toIrConst(constExpression.typeRef.toIrType())
}
@@ -26933,12 +26933,6 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt");
}
@Test
@TestMetadata("prefixIncDecFir.kt")
public void testPrefixIncDecFir() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDecFir.kt");
}
@Test
@TestMetadata("rangeFromCollection.kt")
public void testRangeFromCollection() throws Exception {
@@ -49309,24 +49303,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/statics/incInClassObject.kt");
}
@Test
@TestMetadata("incInClassObjectFir.kt")
public void testIncInClassObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInClassObjectFir.kt");
}
@Test
@TestMetadata("incInObject.kt")
public void testIncInObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObject.kt");
}
@Test
@TestMetadata("incInObjectFir.kt")
public void testIncInObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObjectFir.kt");
}
@Test
@TestMetadata("inheritedPropertyInClassObject.kt")
public void testInheritedPropertyInClassObject() throws Exception {
@@ -26933,12 +26933,6 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt");
}
@Test
@TestMetadata("prefixIncDecFir.kt")
public void testPrefixIncDecFir() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDecFir.kt");
}
@Test
@TestMetadata("rangeFromCollection.kt")
public void testRangeFromCollection() throws Exception {
@@ -49309,24 +49303,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/statics/incInClassObject.kt");
}
@Test
@TestMetadata("incInClassObjectFir.kt")
public void testIncInClassObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInClassObjectFir.kt");
}
@Test
@TestMetadata("incInObject.kt")
public void testIncInObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObject.kt");
}
@Test
@TestMetadata("incInObjectFir.kt")
public void testIncInObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObjectFir.kt");
}
@Test
@TestMetadata("inheritedPropertyInClassObject.kt")
public void testInheritedPropertyInClassObject() throws Exception {
@@ -54,44 +54,38 @@ FILE: safeCallsWithUnaryOperators.kt
a#?.{ {
lval <array>: <implicit> = $subj$.b#
lval <index_0>: <implicit> = IntegerLiteral(0)
lval <unary-result>: <implicit> = R|<local>/<array>|.get#(R|<local>/<index_0>|).inc#()
R|<local>/<array>|.set#(R|<local>/<index_0>|, R|<local>/<unary-result>|)
R|<local>/<unary-result>|
R|<local>/<array>|.set#(R|<local>/<index_0>|, R|<local>/<array>|.get#(R|<local>/<index_0>|).inc#())
R|<local>/<array>|.get#(R|<local>/<index_0>|)
}
}
a#?.{ $subj$.b# }?.{ {
lval <array>: <implicit> = $subj$.c#
lval <index_0>: <implicit> = IntegerLiteral(0)
lval <unary-result>: <implicit> = R|<local>/<array>|.get#(R|<local>/<index_0>|).inc#()
R|<local>/<array>|.set#(R|<local>/<index_0>|, R|<local>/<unary-result>|)
R|<local>/<unary-result>|
R|<local>/<array>|.set#(R|<local>/<index_0>|, R|<local>/<array>|.get#(R|<local>/<index_0>|).inc#())
R|<local>/<array>|.get#(R|<local>/<index_0>|)
}
}
lval <array>: <implicit> = a#?.{ $subj$.b# }.c#
lval <index_0>: <implicit> = IntegerLiteral(0)
lval <unary-result>: <implicit> = R|<local>/<array>|.get#(R|<local>/<index_0>|).inc#()
R|<local>/<array>|.set#(R|<local>/<index_0>|, R|<local>/<unary-result>|)
R|<local>/<unary-result>|
R|<local>/<array>|.set#(R|<local>/<index_0>|, R|<local>/<array>|.get#(R|<local>/<index_0>|).inc#())
R|<local>/<array>|.get#(R|<local>/<index_0>|)
a#?.{ {
lval <array>: <implicit> = $subj$.b#.get#(IntegerLiteral(0))
lval <index_0>: <implicit> = IntegerLiteral(0)
lval <unary-result>: <implicit> = R|<local>/<array>|.get#(R|<local>/<index_0>|).inc#()
R|<local>/<array>|.set#(R|<local>/<index_0>|, R|<local>/<unary-result>|)
R|<local>/<unary-result>|
R|<local>/<array>|.set#(R|<local>/<index_0>|, R|<local>/<array>|.get#(R|<local>/<index_0>|).inc#())
R|<local>/<array>|.get#(R|<local>/<index_0>|)
}
}
a#?.{ $subj$.b# }?.{ {
lval <array>: <implicit> = $subj$.c#.get#(IntegerLiteral(0))
lval <index_0>: <implicit> = IntegerLiteral(0)
lval <unary-result>: <implicit> = R|<local>/<array>|.get#(R|<local>/<index_0>|).inc#()
R|<local>/<array>|.set#(R|<local>/<index_0>|, R|<local>/<unary-result>|)
R|<local>/<unary-result>|
R|<local>/<array>|.set#(R|<local>/<index_0>|, R|<local>/<array>|.get#(R|<local>/<index_0>|).inc#())
R|<local>/<array>|.get#(R|<local>/<index_0>|)
}
}
lval <array>: <implicit> = a#?.{ $subj$.b# }.c#.get#(IntegerLiteral(0))
lval <index_0>: <implicit> = IntegerLiteral(0)
lval <unary-result>: <implicit> = R|<local>/<array>|.get#(R|<local>/<index_0>|).inc#()
R|<local>/<array>|.set#(R|<local>/<index_0>|, R|<local>/<unary-result>|)
R|<local>/<unary-result>|
R|<local>/<array>|.set#(R|<local>/<index_0>|, R|<local>/<array>|.get#(R|<local>/<index_0>|).inc#())
R|<local>/<array>|.get#(R|<local>/<index_0>|)
++a#?.{ $subj$.b# }.d#()
}
@@ -37,9 +37,8 @@ FILE: unary.kt
lval x2: <implicit> = {
lval <array>: <implicit> = arr#
lval <index_0>: <implicit> = IntegerLiteral(1)
lval <unary-result>: <implicit> = R|<local>/<array>|.get#(R|<local>/<index_0>|).inc#()
R|<local>/<array>|.set#(R|<local>/<index_0>|, R|<local>/<unary-result>|)
R|<local>/<unary-result>|
R|<local>/<array>|.set#(R|<local>/<index_0>|, R|<local>/<array>|.get#(R|<local>/<index_0>|).inc#())
R|<local>/<array>|.get#(R|<local>/<index_0>|)
}
}
@@ -64,9 +63,8 @@ FILE: unary.kt
lval x2: <implicit> = {
lval <array>: <implicit> = y#.arr#
lval <index_0>: <implicit> = IntegerLiteral(1)
lval <unary-result>: <implicit> = R|<local>/<array>|.get#(R|<local>/<index_0>|).inc#()
R|<local>/<array>|.set#(R|<local>/<index_0>|, R|<local>/<unary-result>|)
R|<local>/<unary-result>|
R|<local>/<array>|.set#(R|<local>/<index_0>|, R|<local>/<array>|.get#(R|<local>/<index_0>|).inc#())
R|<local>/<array>|.get#(R|<local>/<index_0>|)
}
}
@@ -471,32 +471,6 @@ abstract class BaseFirBuilder<T>(val baseSession: FirSession, val context: Conte
}
}
/**
* given:
* receiver++
*
* result:
* {
* val <unary> = receiver
* receiver = <unary>.inc()
* ^<unary>
* }
*
* given:
* ++receiver
*
* result:
* {
* val <unary-result> = receiver.inc()
* receiver = <unary-result>
* ^<unary-result>
* }
*
*/
// TODO:
// 1. Support receiver capturing for `a?.b++` (elementType == SAFE_ACCESS_EXPRESSION).
// 2. Add box test cases for #1 where receiver expression has side effects.
fun generateIncrementOrDecrementBlock(
// Used to obtain source-element or text
wholeExpression: T,
@@ -532,91 +506,6 @@ abstract class BaseFirBuilder<T>(val baseSession: FirSession, val context: Conte
}
/**
* given:
* receiver++
*
* result:
* {
* val <unary> = receiver
* val resultVar = <unary>.inc()
* appendAssignment(resultVar)
* ^<unary>
* }
*
* given:
* ++receiver
*
* result:
* {
* val <unary-result> = receiver.inc()
* val resultVar = <unary-result>
* appendAssignment(resultVar)
* ^<unary-result>
* }
*
*/
private fun FirBlockBuilder.putIncrementOrDecrementStatements(
receiver: FirExpression,
operationReference: T?,
callName: Name, // 'inc' or 'dec'
prefix: Boolean,
nameIfSimpleReference: Name?, // 'b' if whole expression is simple `b++` or `a.b++`, but not `a[1]++`
desugaredSource: KtSourceElement?,
appendAssignment: FirBlockBuilder.(resultInitializer: FirExpression, resultVar: FirVariable) -> Unit
) {
// initialValueVar is only used for postfix increment/decrement (stores the argument value before increment/decrement).
val initialValueVar = generateTemporaryVariable(
baseModuleData,
desugaredSource,
SpecialNames.UNARY,
receiver
)
// resultInitializer is the expression for `argument.inc()`
val resultInitializer = buildFunctionCall {
source = desugaredSource
calleeReference = buildSimpleNamedReference {
val kind = if (prefix) {
KtFakeSourceElementKind.DesugaredPrefixNameReference
} else {
KtFakeSourceElementKind.DesugaredPostfixNameReference
}
source = operationReference?.toFirSourceElement(kind)
name = callName
}
explicitReceiver = if (prefix) {
receiver
} else {
generateResolvedAccessExpression(desugaredSource, initialValueVar)
}
origin = FirFunctionCallOrigin.Operator
}
// resultVar is only used for prefix increment/decrement.
val resultVar = generateTemporaryVariable(
baseModuleData,
desugaredSource,
SpecialNames.UNARY_RESULT,
resultInitializer
)
if (prefix) {
if (nameIfSimpleReference != null) {
appendAssignment(resultInitializer, resultVar)
statements += generateAccessExpression(desugaredSource, desugaredSource, nameIfSimpleReference)
} else {
statements += resultVar
appendAssignment(resultInitializer, resultVar)
statements += generateResolvedAccessExpression(desugaredSource, resultVar)
}
} else {
statements += initialValueVar
appendAssignment(resultInitializer, resultVar)
statements += generateResolvedAccessExpression(desugaredSource, initialValueVar)
}
}
private fun T?.unwrap(): T? {
// NOTE: By removing surrounding parentheses and labels, FirLabels will NOT be created for those labels.
// This should be fine since the label is meaningless and unusable for a ++/-- argument or assignment LHS.
@@ -653,9 +542,8 @@ abstract class BaseFirBuilder<T>(val baseSession: FirSession, val context: Conte
* val <array> = a
* val <index0> = b
* val <index1> = c
* val <unary-result> = <array>.get(b, c).inc()
* <array>.set(b, c, <unary-result>)
* ^<unary-result>
* <array>.set(b, c, <array>.get(b, c).inc())
* ^<array>.get(b, c)
* }
*
*/
@@ -668,7 +556,7 @@ abstract class BaseFirBuilder<T>(val baseSession: FirSession, val context: Conte
convert: T.() -> FirExpression
): FirExpression {
val array = receiver.arrayExpression
return buildBlockProbablyUnderSafeCall(
return buildBlockPossiblyUnderSafeCall(
array, convert, receiver.toFirSourceElement(),
) { arrayReceiver ->
val baseSource = wholeExpression?.toFirSourceElement()
@@ -694,44 +582,74 @@ abstract class BaseFirBuilder<T>(val baseSession: FirSession, val context: Conte
).also { statements += it }
}
val firArgument = buildFunctionCall {
source = desugaredSource
calleeReference = buildSimpleNamedReference {
source = receiver?.toFirSourceElement(KtFakeSourceElementKind.ArrayAccessNameReference)
name = OperatorNameConventions.GET
}
explicitReceiver = generateResolvedAccessExpression(arrayVariable.source, arrayVariable)
argumentList = buildArgumentList {
for (indexVar in indexVariables) {
arguments += generateResolvedAccessExpression(indexVar.source, indexVar)
}
}
origin = FirFunctionCallOrigin.Operator
}
putIncrementOrDecrementStatements(
firArgument, operationReference, callName, prefix,
nameIfSimpleReference = null, desugaredSource
) { resultInitializer: FirExpression, resultVar: FirVariable ->
statements += buildFunctionCall {
fun buildGetCall(referenceSourceKind: KtFakeSourceElementKind = KtFakeSourceElementKind.ArrayAccessNameReference) =
buildFunctionCall {
source = desugaredSource
calleeReference = buildSimpleNamedReference {
source = receiver.toFirSourceElement()
name = OperatorNameConventions.SET
source = receiver?.toFirSourceElement(referenceSourceKind)
name = OperatorNameConventions.GET
}
explicitReceiver = generateResolvedAccessExpression(arrayVariable.source, arrayVariable)
argumentList = buildArgumentList {
for (indexVar in indexVariables) {
arguments += generateResolvedAccessExpression(indexVar.source, indexVar)
}
arguments += if (prefix) {
generateResolvedAccessExpression(source, resultVar)
} else {
resultInitializer
}
}
origin = FirFunctionCallOrigin.Operator
}
fun buildSetCall(argumentExpression: FirExpression) = buildFunctionCall {
source = desugaredSource
calleeReference = buildSimpleNamedReference {
source = receiver.toFirSourceElement()
name = OperatorNameConventions.SET
}
explicitReceiver = generateResolvedAccessExpression(arrayVariable.source, arrayVariable)
argumentList = buildArgumentList {
for (indexVar in indexVariables) {
arguments += generateResolvedAccessExpression(indexVar.source, indexVar)
}
arguments += argumentExpression
}
origin = FirFunctionCallOrigin.Operator
}
fun buildIncDecCall(kind: KtFakeSourceElementKind, receiver: FirExpression) = buildFunctionCall {
source = desugaredSource
calleeReference = buildSimpleNamedReference {
source = operationReference?.toFirSourceElement(kind)
name = callName
}
explicitReceiver = receiver
origin = FirFunctionCallOrigin.Operator
}
if (prefix) {
statements += buildSetCall(
buildIncDecCall(
KtFakeSourceElementKind.DesugaredPrefixNameReference,
buildGetCall()
)
)
statements += buildGetCall(KtFakeSourceElementKind.DesugaredPrefixSecondGetReference)
} else {
val initialValueVar = generateTemporaryVariable(
baseModuleData,
desugaredSource,
SpecialNames.UNARY,
buildGetCall()
)
statements += initialValueVar
statements += buildSetCall(
buildIncDecCall(
KtFakeSourceElementKind.DesugaredPostfixNameReference,
generateResolvedAccessExpression(desugaredSource, initialValueVar)
)
)
statements += generateResolvedAccessExpression(desugaredSource, initialValueVar)
}
}
}
@@ -741,7 +659,7 @@ abstract class BaseFirBuilder<T>(val baseSession: FirSession, val context: Conte
// a?.{ val receiver = $subj$.f() ... } where `...` is generated by `init(FIR<$subj$.f()>)`
//
// Otherwise just returns buildBlock { init(FIR<receiver>)) }
private fun buildBlockProbablyUnderSafeCall(
private fun buildBlockPossiblyUnderSafeCall(
receiver: T?,
convert: T.() -> FirExpression,
sourceElementForError: KtSourceElement?,
@@ -391,6 +391,16 @@ fun BodyResolveComponents.transformWhenSubjectExpressionUsingSmartcastInfo(
return builder.build()
}
fun BodyResolveComponents.transformDesugaredAssignmentValueUsingSmartcastInfo(
expression: FirDesugaredAssignmentValueReferenceExpression
): FirExpression {
val (stability, typesFromSmartCast) = dataFlowAnalyzer.getTypeUsingSmartcastInfo(expression.expressionRef.value) ?: return expression
val builder = transformExpressionUsingSmartcastInfo(
expression, stability, typesFromSmartCast
) ?: return expression
return builder.build()
}
private val ConeKotlinType.isKindOfNothing
get() = lowerBoundIfFlexible().let { it.isNothing || it.isNullableNothing }
@@ -750,26 +750,16 @@ open class FirExpressionsResolveTransformer(transformer: FirAbstractBodyResolveT
}
if (incrementDecrementExpression.isPrefix) {
val targetProperty = expression.calleeReference?.toResolvedPropertySymbol()?.fir
val operatorCall = buildAndResolveOperatorCall(expression)
// Special case for prefix inc/dec on local variable without delegate where unary-result variable generation is skipped.
if (targetProperty?.isLocal == true && targetProperty.delegate == null) {
// a = a.inc()
statements += buildAndResolveVariableAssignment(operatorCall)
// ^a
statements += targetProperty.toQualifiedAccess(fakeSource = desugaredSource, typeRef = noExpectedType)
// If inc() returns a subtype of its receiver type, the variable access should be smart-casted.
.transform<FirStatement, ResolutionMode>(transformer, withExpectedType(operatorCall.typeRef.coneType))
} else {
val unaryResultVariable = generateTemporaryVariable(SpecialNames.UNARY_RESULT, operatorCall)
// val <unary-result> = a.inc()
statements += unaryResultVariable
// a = <unary-result>
statements += buildAndResolveVariableAssignment(unaryResultVariable.toQualifiedAccess(fakeSource = desugaredSource))
// ^<unary-result>
statements += unaryResultVariable.toQualifiedAccess(fakeSource = desugaredSource)
// a = a.inc()
statements += buildAndResolveVariableAssignment(buildAndResolveOperatorCall(expression))
// ^a
statements += buildDesugaredAssignmentValueReferenceExpression {
source = ((expression as? FirErrorExpression)?.expression ?: expression).source
?.fakeElement(KtFakeSourceElementKind.DesugaredIncrementOrDecrement)
expressionRef = FirExpressionRef<FirExpression>().apply { bind(expression.unwrapSmartcastExpression()) }
}.let {
it.transform<FirStatement, ResolutionMode>(transformer, ResolutionMode.ContextIndependent)
components.transformDesugaredAssignmentValueUsingSmartcastInfo(it)
}
} else {
val unaryVariable = generateTemporaryVariable(SpecialNames.UNARY, expression)
@@ -133,6 +133,9 @@ sealed class KtFakeSourceElementKind(final override val shouldSkipErrorTypeRepor
// x = x++ -> x = { val <unary> = x; x = <unary>.inc(); <unary> }
object DesugaredIncrementOrDecrement : KtFakeSourceElementKind()
// In ++a[1], a.get(1) will be called twice. This kind is used for the second call reference.
object DesugaredPrefixSecondGetReference : KtFakeSourceElementKind()
// ++x --> `inc` calleeReference
object DesugaredPrefixNameReference : KtFakeSourceElementKind()
@@ -1,5 +1,3 @@
// IGNORE_BACKEND_K2: JVM_IR, JS_IR, NATIVE
// FIR status: don't support legacy feature (prefix increment calls getter twice). fail 2: anone1
var inc: String = ""
class X {
@@ -25,4 +23,4 @@ fun box(): String {
if (res != "aanone1none") return "fail 2: ${res}"
return "OK"
}
}
@@ -1,6 +1,3 @@
// IGNORE_BACKEND_K2: JVM_IR, JS_IR, NATIVE
// FIR status: don't support legacy feature; questionable test, probably should not support.
// Currently fails because prefix increment only calls getter once.
var log = ""
fun <T> logged(value: T): T =
@@ -1,6 +1,3 @@
// IGNORE_BACKEND_K2: ANY
// Behavior changed in K2, see KT-42077
public var inc: Int = 0
public var propInc: Int = 0
@@ -1,34 +0,0 @@
// IGNORE_BACKEND_K1: ANY
// Behavior changed in K2, see KT-42077
// IGNORE_BACKEND: WASM
// SKIP_NODE_JS
public var inc: Int = 0
public var propInc: Int = 0
get() {++inc; return field}
set(a: Int) {
++inc
field = a
}
public var dec: Int = 0
public var propDec: Int = 0
get() { --dec; return field}
set(a: Int) {
--dec
field = a
}
fun box(): String {
++propInc
if (inc != 2) return "fail in prefix increment: ${inc} != 2"
if (propInc != 1) return "fail in prefix increment: ${propInc} != 1"
--propDec
if (dec != -2) return "fail in prefix decrement: ${dec} != -2"
if (propDec != -1) return "fail in prefix decrement: ${propDec} != -1"
return "OK"
}
@@ -1,6 +1,3 @@
// IGNORE_BACKEND_K2: ANY
// Behavior changed in K2, see KT-42077
class A {
companion object {
private var r: Int = 1;
@@ -1,78 +0,0 @@
// IGNORE_BACKEND_K1: ANY
// Behavior changed in K2, see KT-42077
// IGNORE_BACKEND: WASM
// SKIP_NODE_JS
class A {
companion object {
private var r: Int = 1;
fun test(): Int {
r++
++r
return r
}
var holder: String = ""
var r2: Int = 1
get() {
holder += "getR2"
return field
}
fun test2() : Int {
r2++
++r2
return r2
}
var r3: Int = 1
set(p: Int) {
holder += "setR3"
field = p
}
fun test3() : Int {
r3++
++r3
return r3
}
var r4: Int = 1
get() {
holder += "getR4"
return field
}
set(p: Int) {
holder += "setR4"
field = p
}
fun test4() : Int {
r4++
holder += ":"
++r4
return r4
}
}
}
fun box() : String {
val p = A.test()
if (p != 3) return "fail 1: $p"
val p2 = A.test2()
var holderValue = A.holder
if (p2 != 3 || holderValue != "getR2getR2getR2") return "fail 2: $p2 ${holderValue}"
A.holder = ""
val p3 = A.test3()
if (p3 != 3 || A.holder != "setR3setR3") return "fail 3: $p3 ${A.holder}"
A.holder = ""
val p4 = A.test4()
if (p4 != 3 || A.holder != "getR4setR4:getR4setR4getR4") return "fail 4: $p4 ${A.holder}"
return "OK"
}
-3
View File
@@ -1,6 +1,3 @@
// IGNORE_BACKEND_K2: ANY
// Behavior changed in K2, see KT-42077
object A {
private var r: Int = 1;
-76
View File
@@ -1,76 +0,0 @@
// IGNORE_BACKEND_K1: ANY
// Behavior changed in K2, see KT-42077
// IGNORE_BACKEND: WASM
// SKIP_NODE_JS
object A {
private var r: Int = 1;
fun test() : Int {
r++
++r
return r
}
var holder: String = ""
var r2: Int = 1
get() {
holder += "getR2"
return field
}
fun test2() : Int {
r2++
++r2
return r2
}
var r3: Int = 1
set(p: Int) {
holder += "setR3"
field = p
}
fun test3() : Int {
r3++
++r3
return r3
}
var r4: Int = 1
get() {
holder += "getR4"
return field
}
set(p: Int) {
holder += "setR4"
field = p
}
fun test4() : Int {
r4++
holder += ":"
++r4
return r4
}
}
fun box() : String {
val p = A.test()
if (p != 3) return "fail 1: $p"
val p2 = A.test2()
val holderValue = A.holder
if (p2 != 3 || holderValue != "getR2getR2getR2") return "fail 2: $p2 ${holderValue}"
A.holder = ""
val p3 = A.test3()
if (p3 != 3 || A.holder != "setR3setR3") return "fail 3: $p3 ${A.holder}"
A.holder = ""
val p4 = A.test4()
if (p4 != 3 || A.holder != "getR4setR4:getR4setR4getR4") return "fail 4: $p4 ${A.holder}"
return "OK"
}
@@ -1,5 +1,3 @@
// IGNORE_BACKEND_K2: JVM_IR, JS_IR, NATIVE
// IGNORE_BACKEND_K2_MULTI_MODULE: JVM_IR JVM_IR_SERIALIZE
// FILE: 1.kt
package test
@@ -1,5 +1,3 @@
// IGNORE_BACKEND_K2: JVM_IR, JS_IR, NATIVE
// IGNORE_BACKEND_K2_MULTI_MODULE: JVM_IR JVM_IR_SERIALIZE
// FILE: 1.kt
package test
-46
View File
@@ -1,46 +0,0 @@
class IncDec() {
operator fun inc() : IncDec = this
operator fun dec() : IncDec = this
}
fun testIncDec() {
var x = IncDec()
x++
++x
x--
--x
x = x++
x = x--
x = ++x
x = --x
}
class WrongIncDec() {
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun inc() : Int = 1
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun dec() : Int = 1
}
fun testWrongIncDec() {
var x = WrongIncDec()
x<!RESULT_TYPE_MISMATCH!>++<!>
<!RESULT_TYPE_MISMATCH!>++x<!>
x<!RESULT_TYPE_MISMATCH!>--<!>
<!RESULT_TYPE_MISMATCH!>--x<!>
}
class UnitIncDec() {
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun inc() : Unit {}
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun dec() : Unit {}
}
fun testUnitIncDec() {
var x = UnitIncDec()
x<!INC_DEC_SHOULD_NOT_RETURN_UNIT!>++<!>
<!INC_DEC_SHOULD_NOT_RETURN_UNIT!>++<!>x
x<!INC_DEC_SHOULD_NOT_RETURN_UNIT!>--<!>
<!INC_DEC_SHOULD_NOT_RETURN_UNIT!>--<!>x
x = x<!INC_DEC_SHOULD_NOT_RETURN_UNIT!>++<!>
x = x<!INC_DEC_SHOULD_NOT_RETURN_UNIT!>--<!>
x = <!INC_DEC_SHOULD_NOT_RETURN_UNIT, INC_DEC_SHOULD_NOT_RETURN_UNIT!>++<!>x
x = <!INC_DEC_SHOULD_NOT_RETURN_UNIT, INC_DEC_SHOULD_NOT_RETURN_UNIT!>--<!>x
}
+1
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class IncDec() {
operator fun inc() : IncDec = this
operator fun dec() : IncDec = this
@@ -18,7 +18,7 @@ object MismatchingTypes {
}
fun testMismatchingTypes() {
++<!ARGUMENT_TYPE_MISMATCH!>MismatchingTypes[0]<!>
<!ARGUMENT_TYPE_MISMATCH!>++MismatchingTypes[0]<!>
<!ARGUMENT_TYPE_MISMATCH!>MismatchingTypes[0]++<!>
MismatchingTypes[0] <!UNRESOLVED_REFERENCE!>+=<!> 1
}
@@ -0,0 +1,15 @@
// Breaking change in K2, see KT-57178
open class I {
operator fun inc(): ST = ST()
}
class ST : I()
var topLevel: I
get() = I()
set(value) {}
fun main() {
val x: ST = <!INITIALIZER_TYPE_MISMATCH!>++topLevel<!>
}
@@ -0,0 +1,15 @@
// Breaking change in K2, see KT-57178
open class I {
operator fun inc(): ST = ST()
}
class ST : I()
var topLevel: I
get() = I()
set(value) {}
fun main() {
val x: ST = ++topLevel
}
@@ -0,0 +1,13 @@
// Changed in K2, see KT-57178
open class I {
operator fun inc(): ST = ST()
}
class ST : I()
fun main() {
var local = I()
val x: ST = ++local
val y: ST = local
}
@@ -0,0 +1,13 @@
// Changed in K2, see KT-57178
open class I {
operator fun inc(): ST = ST()
}
class ST : I()
fun main() {
var local = I()
val x: ST = ++local
val y: ST = <!TYPE_MISMATCH!>local<!>
}
@@ -27,6 +27,104 @@ FILE fqName:<root> fileName:/incrementDecrement.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-arr> (): kotlin.IntArray declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:arr type:kotlin.IntArray visibility:private [final,static]' type=kotlin.IntArray origin=null
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
CONSTRUCTOR visibility:public <> () returnType:<root>.C [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:p visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-p> visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.Int
correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-p> (): kotlin.Int declared in <root>.C'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<get-p>' type=<root>.C origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-p> visibility:public modality:FINAL <> ($this:<root>.C, <set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<set-p>' type=<root>.C origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.C.<set-p>' type=kotlin.Int origin=null
FUN name:get visibility:public modality:FINAL <> ($this:<root>.C, i:kotlin.Int) returnType:kotlin.Int [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.C'
GET_VAR 'i: kotlin.Int declared in <root>.C.get' type=kotlin.Int origin=null
FUN name:set visibility:public modality:FINAL <> ($this:<root>.C, i:kotlin.Int, value:kotlin.Int) returnType:kotlin.Unit [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:i index:0 type:kotlin.Int
VALUE_PARAMETER name:value index:1 type:kotlin.Int
BLOCK_BODY
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
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.O
CONSTRUCTOR visibility:private <> () returnType:<root>.O [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:p visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-p> visibility:public modality:FINAL <> ($this:<root>.O) returnType:kotlin.Int
correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.O
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-p> (): kotlin.Int declared in <root>.O'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.O declared in <root>.O.<get-p>' type=<root>.O origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-p> visibility:public modality:FINAL <> ($this:<root>.O, <set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.O
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.O declared in <root>.O.<set-p>' type=<root>.O origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.O.<set-p>' type=kotlin.Int origin=null
FUN name:get visibility:public modality:FINAL <> ($this:<root>.O, i:kotlin.Int) returnType:kotlin.Int [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.O
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.O'
GET_VAR 'i: kotlin.Int declared in <root>.O.get' type=kotlin.Int origin=null
FUN name:set visibility:public modality:FINAL <> ($this:<root>.O, i:kotlin.Int, value:kotlin.Int) returnType:kotlin.Unit [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.O
VALUE_PARAMETER name:i index:0 type:kotlin.Int
VALUE_PARAMETER name:value index:1 type:kotlin.Int
BLOCK_BODY
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
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:testVarPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:x type:kotlin.Int [var]
@@ -67,103 +165,327 @@ FILE fqName:<root> fileName:/incrementDecrement.kt
BLOCK_BODY
VAR name:p1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val]
CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.testPropPrefix' type=kotlin.Int origin=null
GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.testPropPrefix' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
VAR name:p2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val]
CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.testPropPrefix' type=kotlin.Int origin=null
GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.testPropPrefix' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
FUN name:testPropPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:p1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val]
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val]
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.testPropPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.testPropPostfix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.testPropPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.testPropPostfix' type=kotlin.Int origin=null
VAR name:p2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val]
CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val]
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.testPropPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.testPropPostfix' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.testPropPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.testPropPostfix' type=kotlin.Int origin=null
FUN name:testArrayPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:a1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.IntArray [val]
CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_4: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_4: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_4: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
VAR name:a2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.IntArray [val]
CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlin.Int [val]
CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_6: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_7: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_6: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_7: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
value: GET_VAR 'val tmp_8: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
GET_VAR 'val tmp_8: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
VAR name:a2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlin.IntArray [val]
CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlin.Int [val]
CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
value: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_9: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_10: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_9: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_10: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
value: GET_VAR 'val tmp_11: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
GET_VAR 'val tmp_11: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_6: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_7: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_6: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_7: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
FUN name:testArrayPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:a1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_12 type:kotlin.IntArray [val]
VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlin.IntArray [val]
CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
VAR IR_TEMPORARY_VARIABLE name:tmp_13 type:kotlin.Int [val]
VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_14 type:kotlin.Int [val]
VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlin.Int [val]
CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_12: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_13: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_8: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_9: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_12: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_13: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_8: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_9: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_14: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_14: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_10: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_10: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
VAR name:a2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_15 type:kotlin.IntArray [val]
VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlin.IntArray [val]
CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
VAR IR_TEMPORARY_VARIABLE name:tmp_16 type:kotlin.Int [val]
VAR IR_TEMPORARY_VARIABLE name:tmp_12 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_17 type:kotlin.Int [val]
VAR IR_TEMPORARY_VARIABLE name:tmp_13 type:kotlin.Int [val]
CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_15: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_16: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_11: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_12: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_15: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_16: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_11: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_12: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
value: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_17: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_17: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_13: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_13: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
FUN name:testClassPropPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:p1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_14 type:<root>.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.C' type=kotlin.Unit origin=EQ
$this: GET_VAR 'val tmp_14: <root>.C [val] declared in <root>.testClassPropPrefix' type=<root>.C origin=null
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'val tmp_14: <root>.C [val] declared in <root>.testClassPropPrefix' type=<root>.C origin=null
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'val tmp_14: <root>.C [val] declared in <root>.testClassPropPrefix' type=<root>.C origin=null
VAR name:p2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_15 type:<root>.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.C' type=kotlin.Unit origin=EQ
$this: GET_VAR 'val tmp_15: <root>.C [val] declared in <root>.testClassPropPrefix' type=<root>.C origin=null
<set-?>: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'val tmp_15: <root>.C [val] declared in <root>.testClassPropPrefix' type=<root>.C origin=null
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'val tmp_15: <root>.C [val] declared in <root>.testClassPropPrefix' type=<root>.C origin=null
FUN name:testClassPropPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:p1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_16 type:<root>.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_17 type:kotlin.Int [val]
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'val tmp_16: <root>.C [val] declared in <root>.testClassPropPostfix' type=<root>.C origin=null
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.C' type=kotlin.Unit origin=EQ
$this: GET_VAR 'val tmp_16: <root>.C [val] declared in <root>.testClassPropPostfix' type=<root>.C origin=null
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_17: kotlin.Int [val] declared in <root>.testClassPropPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_17: kotlin.Int [val] declared in <root>.testClassPropPostfix' type=kotlin.Int origin=null
VAR name:p2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_18 type:<root>.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_19 type:kotlin.Int [val]
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'val tmp_18: <root>.C [val] declared in <root>.testClassPropPostfix' type=<root>.C origin=null
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.C' type=kotlin.Unit origin=EQ
$this: GET_VAR 'val tmp_18: <root>.C [val] declared in <root>.testClassPropPostfix' type=<root>.C origin=null
<set-?>: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_19: kotlin.Int [val] declared in <root>.testClassPropPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_19: kotlin.Int [val] declared in <root>.testClassPropPostfix' type=kotlin.Int origin=null
FUN name:testClassOperatorPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:a1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_20 type:<root>.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_21 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in <root>.C' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_20: <root>.C [val] declared in <root>.testClassOperatorPrefix' type=<root>.C origin=null
i: GET_VAR 'val tmp_21: kotlin.Int [val] declared in <root>.testClassOperatorPrefix' type=kotlin.Int origin=null
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.C' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_20: <root>.C [val] declared in <root>.testClassOperatorPrefix' type=<root>.C origin=null
i: GET_VAR 'val tmp_21: kotlin.Int [val] declared in <root>.testClassOperatorPrefix' type=kotlin.Int origin=null
CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.C' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_20: <root>.C [val] declared in <root>.testClassOperatorPrefix' type=<root>.C origin=null
i: GET_VAR 'val tmp_21: kotlin.Int [val] declared in <root>.testClassOperatorPrefix' type=kotlin.Int origin=null
VAR name:a2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_22 type:<root>.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_23 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in <root>.C' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_22: <root>.C [val] declared in <root>.testClassOperatorPrefix' type=<root>.C origin=null
i: GET_VAR 'val tmp_23: kotlin.Int [val] declared in <root>.testClassOperatorPrefix' type=kotlin.Int origin=null
value: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.C' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_22: <root>.C [val] declared in <root>.testClassOperatorPrefix' type=<root>.C origin=null
i: GET_VAR 'val tmp_23: kotlin.Int [val] declared in <root>.testClassOperatorPrefix' type=kotlin.Int origin=null
CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.C' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_22: <root>.C [val] declared in <root>.testClassOperatorPrefix' type=<root>.C origin=null
i: GET_VAR 'val tmp_23: kotlin.Int [val] declared in <root>.testClassOperatorPrefix' type=kotlin.Int origin=null
FUN name:testClassOperatorPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:a1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_24 type:<root>.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_25 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_26 type:kotlin.Int [val]
CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.C' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_24: <root>.C [val] declared in <root>.testClassOperatorPostfix' type=<root>.C origin=null
i: GET_VAR 'val tmp_25: kotlin.Int [val] declared in <root>.testClassOperatorPostfix' type=kotlin.Int origin=null
CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in <root>.C' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_24: <root>.C [val] declared in <root>.testClassOperatorPostfix' type=<root>.C origin=null
i: GET_VAR 'val tmp_25: kotlin.Int [val] declared in <root>.testClassOperatorPostfix' type=kotlin.Int origin=null
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_26: kotlin.Int [val] declared in <root>.testClassOperatorPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_26: kotlin.Int [val] declared in <root>.testClassOperatorPostfix' type=kotlin.Int origin=null
VAR name:a2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_27 type:<root>.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_28 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_29 type:kotlin.Int [val]
CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.C' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_27: <root>.C [val] declared in <root>.testClassOperatorPostfix' type=<root>.C origin=null
i: GET_VAR 'val tmp_28: kotlin.Int [val] declared in <root>.testClassOperatorPostfix' type=kotlin.Int origin=null
CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in <root>.C' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_27: <root>.C [val] declared in <root>.testClassOperatorPostfix' type=<root>.C origin=null
i: GET_VAR 'val tmp_28: kotlin.Int [val] declared in <root>.testClassOperatorPostfix' type=kotlin.Int origin=null
value: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_29: kotlin.Int [val] declared in <root>.testClassOperatorPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_29: kotlin.Int [val] declared in <root>.testClassOperatorPostfix' type=kotlin.Int origin=null
FUN name:testObjectPropPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:p1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.O' type=kotlin.Unit origin=EQ
$this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.O' type=kotlin.Int origin=GET_PROPERTY
$this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.O' type=kotlin.Int origin=GET_PROPERTY
$this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
VAR name:p2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.O' type=kotlin.Unit origin=EQ
$this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
<set-?>: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.O' type=kotlin.Int origin=GET_PROPERTY
$this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.O' type=kotlin.Int origin=GET_PROPERTY
$this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
FUN name:testObjectPropPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:p1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_30 type:kotlin.Int [val]
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.O' type=kotlin.Int origin=GET_PROPERTY
$this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.O' type=kotlin.Unit origin=EQ
$this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_30: kotlin.Int [val] declared in <root>.testObjectPropPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_30: kotlin.Int [val] declared in <root>.testObjectPropPostfix' type=kotlin.Int origin=null
VAR name:p2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_31 type:kotlin.Int [val]
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.O' type=kotlin.Int origin=GET_PROPERTY
$this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.O' type=kotlin.Unit origin=EQ
$this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
<set-?>: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_31: kotlin.Int [val] declared in <root>.testObjectPropPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_31: kotlin.Int [val] declared in <root>.testObjectPropPostfix' type=kotlin.Int origin=null
FUN name:testObjectOperatorPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:a1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_32 type:<root>.O [val]
GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
VAR IR_TEMPORARY_VARIABLE name:tmp_33 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in <root>.O' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_32: <root>.O [val] declared in <root>.testObjectOperatorPrefix' type=<root>.O origin=null
i: GET_VAR 'val tmp_33: kotlin.Int [val] declared in <root>.testObjectOperatorPrefix' type=kotlin.Int origin=null
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.O' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_32: <root>.O [val] declared in <root>.testObjectOperatorPrefix' type=<root>.O origin=null
i: GET_VAR 'val tmp_33: kotlin.Int [val] declared in <root>.testObjectOperatorPrefix' type=kotlin.Int origin=null
CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.O' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_32: <root>.O [val] declared in <root>.testObjectOperatorPrefix' type=<root>.O origin=null
i: GET_VAR 'val tmp_33: kotlin.Int [val] declared in <root>.testObjectOperatorPrefix' type=kotlin.Int origin=null
VAR name:a2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_34 type:<root>.O [val]
GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
VAR IR_TEMPORARY_VARIABLE name:tmp_35 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in <root>.O' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_34: <root>.O [val] declared in <root>.testObjectOperatorPrefix' type=<root>.O origin=null
i: GET_VAR 'val tmp_35: kotlin.Int [val] declared in <root>.testObjectOperatorPrefix' type=kotlin.Int origin=null
value: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.O' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_34: <root>.O [val] declared in <root>.testObjectOperatorPrefix' type=<root>.O origin=null
i: GET_VAR 'val tmp_35: kotlin.Int [val] declared in <root>.testObjectOperatorPrefix' type=kotlin.Int origin=null
CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.O' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_34: <root>.O [val] declared in <root>.testObjectOperatorPrefix' type=<root>.O origin=null
i: GET_VAR 'val tmp_35: kotlin.Int [val] declared in <root>.testObjectOperatorPrefix' type=kotlin.Int origin=null
FUN name:testObjectOperatorPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:a1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_36 type:<root>.O [val]
GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
VAR IR_TEMPORARY_VARIABLE name:tmp_37 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_38 type:kotlin.Int [val]
CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.O' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_36: <root>.O [val] declared in <root>.testObjectOperatorPostfix' type=<root>.O origin=null
i: GET_VAR 'val tmp_37: kotlin.Int [val] declared in <root>.testObjectOperatorPostfix' type=kotlin.Int origin=null
CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in <root>.O' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_36: <root>.O [val] declared in <root>.testObjectOperatorPostfix' type=<root>.O origin=null
i: GET_VAR 'val tmp_37: kotlin.Int [val] declared in <root>.testObjectOperatorPostfix' type=kotlin.Int origin=null
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_38: kotlin.Int [val] declared in <root>.testObjectOperatorPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_38: kotlin.Int [val] declared in <root>.testObjectOperatorPostfix' type=kotlin.Int origin=null
VAR name:a2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_39 type:<root>.O [val]
GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
VAR IR_TEMPORARY_VARIABLE name:tmp_40 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_41 type:kotlin.Int [val]
CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.O' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_39: <root>.O [val] declared in <root>.testObjectOperatorPostfix' type=<root>.O origin=null
i: GET_VAR 'val tmp_40: kotlin.Int [val] declared in <root>.testObjectOperatorPostfix' type=kotlin.Int origin=null
CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in <root>.O' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_39: <root>.O [val] declared in <root>.testObjectOperatorPostfix' type=<root>.O origin=null
i: GET_VAR 'val tmp_40: kotlin.Int [val] declared in <root>.testObjectOperatorPostfix' type=kotlin.Int origin=null
value: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_41: kotlin.Int [val] declared in <root>.testObjectOperatorPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_41: kotlin.Int [val] declared in <root>.testObjectOperatorPostfix' type=kotlin.Int origin=null
@@ -7,6 +7,48 @@ val arr: IntArray
field = intArrayOf(elements = [1, 2, 3])
get
class C {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
var p: Int
field = 0
get
set
operator fun get(i: Int): Int {
return i
}
operator fun set(i: Int, value: Int) {
}
}
object O {
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
var p: Int
field = 0
get
set
operator fun get(i: Int): Int {
return i
}
operator fun set(i: Int, value: Int) {
}
}
fun testVarPrefix() {
var x: Int = 0
val x1: Int = { // BLOCK
@@ -35,14 +77,12 @@ fun testVarPostfix() {
fun testPropPrefix() {
val p1: Int = { // BLOCK
val <unary-result>: Int = <get-p>().inc()
<set-p>(<set-?> = <unary-result>)
<unary-result>
<set-p>(<set-?> = <get-p>().inc())
<get-p>()
}
val p2: Int = { // BLOCK
val <unary-result>: Int = <get-p>().dec()
<set-p>(<set-?> = <unary-result>)
<unary-result>
<set-p>(<set-?> = <get-p>().dec())
<get-p>()
}
}
@@ -53,9 +93,9 @@ fun testPropPostfix() {
<unary>
}
val p2: Int = { // BLOCK
val <unary-result>: Int = <get-p>().dec()
<set-p>(<set-?> = <unary-result>)
<unary-result>
val <unary>: Int = <get-p>()
<set-p>(<set-?> = <unary>.dec())
<unary>
}
}
@@ -63,16 +103,14 @@ fun testArrayPrefix() {
val a1: Int = { // BLOCK
val <array>: IntArray = <get-arr>()
val <index_0>: Int = 0
val <unary-result>: Int = <array>.get(index = <index_0>).inc()
<array>.set(index = <index_0>, value = <unary-result>)
<unary-result>
<array>.set(index = <index_0>, value = <array>.get(index = <index_0>).inc())
<array>.get(index = <index_0>)
}
val a2: Int = { // BLOCK
val <array>: IntArray = <get-arr>()
val <index_0>: Int = 0
val <unary-result>: Int = <array>.get(index = <index_0>).dec()
<array>.set(index = <index_0>, value = <unary-result>)
<unary-result>
<array>.set(index = <index_0>, value = <array>.get(index = <index_0>).dec())
<array>.get(index = <index_0>)
}
}
@@ -92,3 +130,119 @@ fun testArrayPostfix() {
<unary>
}
}
fun testClassPropPrefix() {
val p1: Int = { // BLOCK
val <receiver>: C = C()
<receiver>.<set-p>(<set-?> = <receiver>.<get-p>().inc())
<receiver>.<get-p>()
}
val p2: Int = { // BLOCK
val <receiver>: C = C()
<receiver>.<set-p>(<set-?> = <receiver>.<get-p>().dec())
<receiver>.<get-p>()
}
}
fun testClassPropPostfix() {
val p1: Int = { // BLOCK
val <receiver>: C = C()
val <unary>: Int = <receiver>.<get-p>()
<receiver>.<set-p>(<set-?> = <unary>.inc())
<unary>
}
val p2: Int = { // BLOCK
val <receiver>: C = C()
val <unary>: Int = <receiver>.<get-p>()
<receiver>.<set-p>(<set-?> = <unary>.dec())
<unary>
}
}
fun testClassOperatorPrefix() {
val a1: Int = { // BLOCK
val <array>: C = C()
val <index_0>: Int = 0
<array>.set(i = <index_0>, value = <array>.get(i = <index_0>).inc())
<array>.get(i = <index_0>)
}
val a2: Int = { // BLOCK
val <array>: C = C()
val <index_0>: Int = 0
<array>.set(i = <index_0>, value = <array>.get(i = <index_0>).dec())
<array>.get(i = <index_0>)
}
}
fun testClassOperatorPostfix() {
val a1: Int = { // BLOCK
val <array>: C = C()
val <index_0>: Int = 0
val <unary>: Int = <array>.get(i = <index_0>)
<array>.set(i = <index_0>, value = <unary>.inc())
<unary>
}
val a2: Int = { // BLOCK
val <array>: C = C()
val <index_0>: Int = 0
val <unary>: Int = <array>.get(i = <index_0>)
<array>.set(i = <index_0>, value = <unary>.dec())
<unary>
}
}
fun testObjectPropPrefix() {
val p1: Int = { // BLOCK
O.<set-p>(<set-?> = O.<get-p>().inc())
O.<get-p>()
}
val p2: Int = { // BLOCK
O.<set-p>(<set-?> = O.<get-p>().dec())
O.<get-p>()
}
}
fun testObjectPropPostfix() {
val p1: Int = { // BLOCK
val <unary>: Int = O.<get-p>()
O.<set-p>(<set-?> = <unary>.inc())
<unary>
}
val p2: Int = { // BLOCK
val <unary>: Int = O.<get-p>()
O.<set-p>(<set-?> = <unary>.dec())
<unary>
}
}
fun testObjectOperatorPrefix() {
val a1: Int = { // BLOCK
val <array>: O = O
val <index_0>: Int = 0
<array>.set(i = <index_0>, value = <array>.get(i = <index_0>).inc())
<array>.get(i = <index_0>)
}
val a2: Int = { // BLOCK
val <array>: O = O
val <index_0>: Int = 0
<array>.set(i = <index_0>, value = <array>.get(i = <index_0>).dec())
<array>.get(i = <index_0>)
}
}
fun testObjectOperatorPostfix() {
val a1: Int = { // BLOCK
val <array>: O = O
val <index_0>: Int = 0
val <unary>: Int = <array>.get(i = <index_0>)
<array>.set(i = <index_0>, value = <unary>.inc())
<unary>
}
val a2: Int = { // BLOCK
val <array>: O = O
val <index_0>: Int = 0
val <unary>: Int = <array>.get(i = <index_0>)
<array>.set(i = <index_0>, value = <unary>.dec())
<unary>
}
}
@@ -27,6 +27,104 @@ FILE fqName:<root> fileName:/incrementDecrement.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-arr> (): kotlin.IntArray declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:arr type:kotlin.IntArray visibility:private [final,static]' type=kotlin.IntArray origin=null
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
CONSTRUCTOR visibility:public <> () returnType:<root>.C [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:p visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-p> visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.Int
correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-p> (): kotlin.Int declared in <root>.C'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<get-p>' type=<root>.C origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-p> visibility:public modality:FINAL <> ($this:<root>.C, <set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<set-p>' type=<root>.C origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.C.<set-p>' type=kotlin.Int origin=null
FUN name:get visibility:public modality:FINAL <> ($this:<root>.C, i:kotlin.Int) returnType:kotlin.Int [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.C'
GET_VAR 'i: kotlin.Int declared in <root>.C.get' type=kotlin.Int origin=null
FUN name:set visibility:public modality:FINAL <> ($this:<root>.C, i:kotlin.Int, value:kotlin.Int) returnType:kotlin.Unit [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:i index:0 type:kotlin.Int
VALUE_PARAMETER name:value index:1 type:kotlin.Int
BLOCK_BODY
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
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.O
CONSTRUCTOR visibility:private <> () returnType:<root>.O [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:p visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-p> visibility:public modality:FINAL <> ($this:<root>.O) returnType:kotlin.Int
correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.O
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-p> (): kotlin.Int declared in <root>.O'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.O declared in <root>.O.<get-p>' type=<root>.O origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-p> visibility:public modality:FINAL <> ($this:<root>.O, <set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.O
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.O declared in <root>.O.<set-p>' type=<root>.O origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.O.<set-p>' type=kotlin.Int origin=null
FUN name:get visibility:public modality:FINAL <> ($this:<root>.O, i:kotlin.Int) returnType:kotlin.Int [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.O
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.O'
GET_VAR 'i: kotlin.Int declared in <root>.O.get' type=kotlin.Int origin=null
FUN name:set visibility:public modality:FINAL <> ($this:<root>.O, i:kotlin.Int, value:kotlin.Int) returnType:kotlin.Unit [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.O
VALUE_PARAMETER name:i index:0 type:kotlin.Int
VALUE_PARAMETER name:value index:1 type:kotlin.Int
BLOCK_BODY
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
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:testVarPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:x type:kotlin.Int [var]
@@ -91,77 +189,323 @@ FILE fqName:<root> fileName:/incrementDecrement.kt
$this: GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.testPropPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.testPropPostfix' type=kotlin.Int origin=null
VAR name:p2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=PREFIX_DECR
BLOCK type=kotlin.Int origin=PREFIX_DECR
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PREFIX_DECR
<set-?>: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PREFIX_DECR
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PREFIX_DECR
BLOCK type=kotlin.Int origin=POSTFIX_DECR
BLOCK type=kotlin.Int origin=POSTFIX_DECR
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val]
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>' type=kotlin.Int origin=POSTFIX_DECR
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=POSTFIX_DECR
<set-?>: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR
$this: GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.testPropPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.testPropPostfix' type=kotlin.Int origin=null
FUN name:testArrayPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:a1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=PREFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.IntArray [val]
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.IntArray [val]
CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val]
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=PREFIX_INCR
$this: GET_VAR 'val tmp_3: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_4: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR
$this: CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=PREFIX_INCR
$this: GET_VAR 'val tmp_3: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_4: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=PREFIX_INCR
$this: GET_VAR 'val tmp_3: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_4: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
VAR name:a2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=PREFIX_DECR
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.IntArray [val]
VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.IntArray [val]
CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Int [val]
VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=PREFIX_DECR
$this: GET_VAR 'val tmp_5: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_6: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_6: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_7: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
value: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR
$this: CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=PREFIX_DECR
$this: GET_VAR 'val tmp_5: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_6: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_6: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_7: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=PREFIX_DECR
$this: GET_VAR 'val tmp_5: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_6: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_6: kotlin.IntArray [val] declared in <root>.testArrayPrefix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_7: kotlin.Int [val] declared in <root>.testArrayPrefix' type=kotlin.Int origin=null
FUN name:testArrayPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:a1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.IntArray [val]
VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlin.IntArray [val]
CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlin.Int [val]
CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_7: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_8: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_8: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_9: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_7: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_8: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_8: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_9: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_9: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_9: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_10: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_10: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
VAR name:a2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=POSTFIX_DECR
VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlin.IntArray [val]
VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlin.IntArray [val]
CALL 'public final fun <get-arr> (): kotlin.IntArray declared in <root>' type=kotlin.IntArray origin=GET_PROPERTY
VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_12 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_13 type:kotlin.Int [val]
CALL 'public final fun get (index: kotlin.Int): kotlin.Int [operator] declared in kotlin.IntArray' type=kotlin.Int origin=POSTFIX_DECR
$this: GET_VAR 'val tmp_10: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_11: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_11: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_12: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in kotlin.IntArray' type=kotlin.Unit origin=POSTFIX_DECR
$this: GET_VAR 'val tmp_10: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_11: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_11: kotlin.IntArray [val] declared in <root>.testArrayPostfix' type=kotlin.IntArray origin=null
index: GET_VAR 'val tmp_12: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
value: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR
$this: GET_VAR 'val tmp_12: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_12: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_13: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_13: kotlin.Int [val] declared in <root>.testArrayPostfix' type=kotlin.Int origin=null
FUN name:testClassPropPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:p1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=PREFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_14 type:<root>.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
BLOCK type=kotlin.Int origin=PREFIX_INCR
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.C' type=kotlin.Unit origin=PREFIX_INCR
$this: GET_VAR 'val tmp_14: <root>.C [val] declared in <root>.testClassPropPrefix' type=<root>.C origin=null
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=PREFIX_INCR
$this: GET_VAR 'val tmp_14: <root>.C [val] declared in <root>.testClassPropPrefix' type=<root>.C origin=null
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=PREFIX_INCR
$this: GET_VAR 'val tmp_14: <root>.C [val] declared in <root>.testClassPropPrefix' type=<root>.C origin=null
VAR name:p2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=PREFIX_DECR
VAR IR_TEMPORARY_VARIABLE name:tmp_15 type:<root>.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
BLOCK type=kotlin.Int origin=PREFIX_DECR
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.C' type=kotlin.Unit origin=PREFIX_DECR
$this: GET_VAR 'val tmp_15: <root>.C [val] declared in <root>.testClassPropPrefix' type=<root>.C origin=null
<set-?>: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=PREFIX_DECR
$this: GET_VAR 'val tmp_15: <root>.C [val] declared in <root>.testClassPropPrefix' type=<root>.C origin=null
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=PREFIX_DECR
$this: GET_VAR 'val tmp_15: <root>.C [val] declared in <root>.testClassPropPrefix' type=<root>.C origin=null
FUN name:testClassPropPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:p1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_16 type:<root>.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_17 type:kotlin.Int [val]
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_16: <root>.C [val] declared in <root>.testClassPropPostfix' type=<root>.C origin=null
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.C' type=kotlin.Unit origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_16: <root>.C [val] declared in <root>.testClassPropPostfix' type=<root>.C origin=null
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_17: kotlin.Int [val] declared in <root>.testClassPropPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_17: kotlin.Int [val] declared in <root>.testClassPropPostfix' type=kotlin.Int origin=null
VAR name:p2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=POSTFIX_DECR
VAR IR_TEMPORARY_VARIABLE name:tmp_18 type:<root>.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
BLOCK type=kotlin.Int origin=POSTFIX_DECR
VAR IR_TEMPORARY_VARIABLE name:tmp_19 type:kotlin.Int [val]
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=POSTFIX_DECR
$this: GET_VAR 'val tmp_18: <root>.C [val] declared in <root>.testClassPropPostfix' type=<root>.C origin=null
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.C' type=kotlin.Unit origin=POSTFIX_DECR
$this: GET_VAR 'val tmp_18: <root>.C [val] declared in <root>.testClassPropPostfix' type=<root>.C origin=null
<set-?>: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR
$this: GET_VAR 'val tmp_19: kotlin.Int [val] declared in <root>.testClassPropPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_19: kotlin.Int [val] declared in <root>.testClassPropPostfix' type=kotlin.Int origin=null
FUN name:testClassOperatorPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:a1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=PREFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_20 type:<root>.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_21 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in <root>.C' type=kotlin.Unit origin=PREFIX_INCR
$this: GET_VAR 'val tmp_20: <root>.C [val] declared in <root>.testClassOperatorPrefix' type=<root>.C origin=null
i: GET_VAR 'val tmp_21: kotlin.Int [val] declared in <root>.testClassOperatorPrefix' type=kotlin.Int origin=null
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR
$this: CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.C' type=kotlin.Int origin=PREFIX_INCR
$this: GET_VAR 'val tmp_20: <root>.C [val] declared in <root>.testClassOperatorPrefix' type=<root>.C origin=null
i: GET_VAR 'val tmp_21: kotlin.Int [val] declared in <root>.testClassOperatorPrefix' type=kotlin.Int origin=null
CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.C' type=kotlin.Int origin=PREFIX_INCR
$this: GET_VAR 'val tmp_20: <root>.C [val] declared in <root>.testClassOperatorPrefix' type=<root>.C origin=null
i: GET_VAR 'val tmp_21: kotlin.Int [val] declared in <root>.testClassOperatorPrefix' type=kotlin.Int origin=null
VAR name:a2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=PREFIX_DECR
VAR IR_TEMPORARY_VARIABLE name:tmp_22 type:<root>.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_23 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in <root>.C' type=kotlin.Unit origin=PREFIX_DECR
$this: GET_VAR 'val tmp_22: <root>.C [val] declared in <root>.testClassOperatorPrefix' type=<root>.C origin=null
i: GET_VAR 'val tmp_23: kotlin.Int [val] declared in <root>.testClassOperatorPrefix' type=kotlin.Int origin=null
value: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR
$this: CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.C' type=kotlin.Int origin=PREFIX_DECR
$this: GET_VAR 'val tmp_22: <root>.C [val] declared in <root>.testClassOperatorPrefix' type=<root>.C origin=null
i: GET_VAR 'val tmp_23: kotlin.Int [val] declared in <root>.testClassOperatorPrefix' type=kotlin.Int origin=null
CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.C' type=kotlin.Int origin=PREFIX_DECR
$this: GET_VAR 'val tmp_22: <root>.C [val] declared in <root>.testClassOperatorPrefix' type=<root>.C origin=null
i: GET_VAR 'val tmp_23: kotlin.Int [val] declared in <root>.testClassOperatorPrefix' type=kotlin.Int origin=null
FUN name:testClassOperatorPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:a1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_24 type:<root>.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_25 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_26 type:kotlin.Int [val]
CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.C' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_24: <root>.C [val] declared in <root>.testClassOperatorPostfix' type=<root>.C origin=null
i: GET_VAR 'val tmp_25: kotlin.Int [val] declared in <root>.testClassOperatorPostfix' type=kotlin.Int origin=null
CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in <root>.C' type=kotlin.Unit origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_24: <root>.C [val] declared in <root>.testClassOperatorPostfix' type=<root>.C origin=null
i: GET_VAR 'val tmp_25: kotlin.Int [val] declared in <root>.testClassOperatorPostfix' type=kotlin.Int origin=null
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_26: kotlin.Int [val] declared in <root>.testClassOperatorPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_26: kotlin.Int [val] declared in <root>.testClassOperatorPostfix' type=kotlin.Int origin=null
VAR name:a2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=POSTFIX_DECR
VAR IR_TEMPORARY_VARIABLE name:tmp_27 type:<root>.C [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_28 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_29 type:kotlin.Int [val]
CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.C' type=kotlin.Int origin=POSTFIX_DECR
$this: GET_VAR 'val tmp_27: <root>.C [val] declared in <root>.testClassOperatorPostfix' type=<root>.C origin=null
i: GET_VAR 'val tmp_28: kotlin.Int [val] declared in <root>.testClassOperatorPostfix' type=kotlin.Int origin=null
CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in <root>.C' type=kotlin.Unit origin=POSTFIX_DECR
$this: GET_VAR 'val tmp_27: <root>.C [val] declared in <root>.testClassOperatorPostfix' type=<root>.C origin=null
i: GET_VAR 'val tmp_28: kotlin.Int [val] declared in <root>.testClassOperatorPostfix' type=kotlin.Int origin=null
value: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR
$this: GET_VAR 'val tmp_29: kotlin.Int [val] declared in <root>.testClassOperatorPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_29: kotlin.Int [val] declared in <root>.testClassOperatorPostfix' type=kotlin.Int origin=null
FUN name:testObjectPropPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:p1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=PREFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_30 type:<root>.O [val]
GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
BLOCK type=kotlin.Int origin=PREFIX_INCR
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.O' type=kotlin.Unit origin=PREFIX_INCR
$this: GET_VAR 'val tmp_30: <root>.O [val] declared in <root>.testObjectPropPrefix' type=<root>.O origin=null
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.O' type=kotlin.Int origin=PREFIX_INCR
$this: GET_VAR 'val tmp_30: <root>.O [val] declared in <root>.testObjectPropPrefix' type=<root>.O origin=null
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.O' type=kotlin.Int origin=PREFIX_INCR
$this: GET_VAR 'val tmp_30: <root>.O [val] declared in <root>.testObjectPropPrefix' type=<root>.O origin=null
VAR name:p2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=PREFIX_DECR
VAR IR_TEMPORARY_VARIABLE name:tmp_31 type:<root>.O [val]
GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
BLOCK type=kotlin.Int origin=PREFIX_DECR
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.O' type=kotlin.Unit origin=PREFIX_DECR
$this: GET_VAR 'val tmp_31: <root>.O [val] declared in <root>.testObjectPropPrefix' type=<root>.O origin=null
<set-?>: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR
$this: CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.O' type=kotlin.Int origin=PREFIX_DECR
$this: GET_VAR 'val tmp_31: <root>.O [val] declared in <root>.testObjectPropPrefix' type=<root>.O origin=null
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.O' type=kotlin.Int origin=PREFIX_DECR
$this: GET_VAR 'val tmp_31: <root>.O [val] declared in <root>.testObjectPropPrefix' type=<root>.O origin=null
FUN name:testObjectPropPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:p1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_32 type:<root>.O [val]
GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_33 type:kotlin.Int [val]
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.O' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_32: <root>.O [val] declared in <root>.testObjectPropPostfix' type=<root>.O origin=null
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.O' type=kotlin.Unit origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_32: <root>.O [val] declared in <root>.testObjectPropPostfix' type=<root>.O origin=null
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_33: kotlin.Int [val] declared in <root>.testObjectPropPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_33: kotlin.Int [val] declared in <root>.testObjectPropPostfix' type=kotlin.Int origin=null
VAR name:p2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=POSTFIX_DECR
VAR IR_TEMPORARY_VARIABLE name:tmp_34 type:<root>.O [val]
GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
BLOCK type=kotlin.Int origin=POSTFIX_DECR
VAR IR_TEMPORARY_VARIABLE name:tmp_35 type:kotlin.Int [val]
CALL 'public final fun <get-p> (): kotlin.Int declared in <root>.O' type=kotlin.Int origin=POSTFIX_DECR
$this: GET_VAR 'val tmp_34: <root>.O [val] declared in <root>.testObjectPropPostfix' type=<root>.O origin=null
CALL 'public final fun <set-p> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.O' type=kotlin.Unit origin=POSTFIX_DECR
$this: GET_VAR 'val tmp_34: <root>.O [val] declared in <root>.testObjectPropPostfix' type=<root>.O origin=null
<set-?>: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR
$this: GET_VAR 'val tmp_35: kotlin.Int [val] declared in <root>.testObjectPropPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_35: kotlin.Int [val] declared in <root>.testObjectPropPostfix' type=kotlin.Int origin=null
FUN name:testObjectOperatorPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:a1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=PREFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_36 type:<root>.O [val]
GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
VAR IR_TEMPORARY_VARIABLE name:tmp_37 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in <root>.O' type=kotlin.Unit origin=PREFIX_INCR
$this: GET_VAR 'val tmp_36: <root>.O [val] declared in <root>.testObjectOperatorPrefix' type=<root>.O origin=null
i: GET_VAR 'val tmp_37: kotlin.Int [val] declared in <root>.testObjectOperatorPrefix' type=kotlin.Int origin=null
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR
$this: CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.O' type=kotlin.Int origin=PREFIX_INCR
$this: GET_VAR 'val tmp_36: <root>.O [val] declared in <root>.testObjectOperatorPrefix' type=<root>.O origin=null
i: GET_VAR 'val tmp_37: kotlin.Int [val] declared in <root>.testObjectOperatorPrefix' type=kotlin.Int origin=null
CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.O' type=kotlin.Int origin=PREFIX_INCR
$this: GET_VAR 'val tmp_36: <root>.O [val] declared in <root>.testObjectOperatorPrefix' type=<root>.O origin=null
i: GET_VAR 'val tmp_37: kotlin.Int [val] declared in <root>.testObjectOperatorPrefix' type=kotlin.Int origin=null
VAR name:a2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=PREFIX_DECR
VAR IR_TEMPORARY_VARIABLE name:tmp_38 type:<root>.O [val]
GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
VAR IR_TEMPORARY_VARIABLE name:tmp_39 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in <root>.O' type=kotlin.Unit origin=PREFIX_DECR
$this: GET_VAR 'val tmp_38: <root>.O [val] declared in <root>.testObjectOperatorPrefix' type=<root>.O origin=null
i: GET_VAR 'val tmp_39: kotlin.Int [val] declared in <root>.testObjectOperatorPrefix' type=kotlin.Int origin=null
value: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR
$this: CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.O' type=kotlin.Int origin=PREFIX_DECR
$this: GET_VAR 'val tmp_38: <root>.O [val] declared in <root>.testObjectOperatorPrefix' type=<root>.O origin=null
i: GET_VAR 'val tmp_39: kotlin.Int [val] declared in <root>.testObjectOperatorPrefix' type=kotlin.Int origin=null
CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.O' type=kotlin.Int origin=PREFIX_DECR
$this: GET_VAR 'val tmp_38: <root>.O [val] declared in <root>.testObjectOperatorPrefix' type=<root>.O origin=null
i: GET_VAR 'val tmp_39: kotlin.Int [val] declared in <root>.testObjectOperatorPrefix' type=kotlin.Int origin=null
FUN name:testObjectOperatorPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:a1 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_40 type:<root>.O [val]
GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
VAR IR_TEMPORARY_VARIABLE name:tmp_41 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_42 type:kotlin.Int [val]
CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.O' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_40: <root>.O [val] declared in <root>.testObjectOperatorPostfix' type=<root>.O origin=null
i: GET_VAR 'val tmp_41: kotlin.Int [val] declared in <root>.testObjectOperatorPostfix' type=kotlin.Int origin=null
CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in <root>.O' type=kotlin.Unit origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_40: <root>.O [val] declared in <root>.testObjectOperatorPostfix' type=<root>.O origin=null
i: GET_VAR 'val tmp_41: kotlin.Int [val] declared in <root>.testObjectOperatorPostfix' type=kotlin.Int origin=null
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_42: kotlin.Int [val] declared in <root>.testObjectOperatorPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_42: kotlin.Int [val] declared in <root>.testObjectOperatorPostfix' type=kotlin.Int origin=null
VAR name:a2 type:kotlin.Int [val]
BLOCK type=kotlin.Int origin=POSTFIX_DECR
VAR IR_TEMPORARY_VARIABLE name:tmp_43 type:<root>.O [val]
GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.O
VAR IR_TEMPORARY_VARIABLE name:tmp_44 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=0
VAR IR_TEMPORARY_VARIABLE name:tmp_45 type:kotlin.Int [val]
CALL 'public final fun get (i: kotlin.Int): kotlin.Int [operator] declared in <root>.O' type=kotlin.Int origin=POSTFIX_DECR
$this: GET_VAR 'val tmp_43: <root>.O [val] declared in <root>.testObjectOperatorPostfix' type=<root>.O origin=null
i: GET_VAR 'val tmp_44: kotlin.Int [val] declared in <root>.testObjectOperatorPostfix' type=kotlin.Int origin=null
CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit [operator] declared in <root>.O' type=kotlin.Unit origin=POSTFIX_DECR
$this: GET_VAR 'val tmp_43: <root>.O [val] declared in <root>.testObjectOperatorPostfix' type=<root>.O origin=null
i: GET_VAR 'val tmp_44: kotlin.Int [val] declared in <root>.testObjectOperatorPostfix' type=kotlin.Int origin=null
value: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR
$this: GET_VAR 'val tmp_45: kotlin.Int [val] declared in <root>.testObjectOperatorPostfix' type=kotlin.Int origin=null
GET_VAR 'val tmp_45: kotlin.Int [val] declared in <root>.testObjectOperatorPostfix' type=kotlin.Int origin=null
@@ -1,6 +1,18 @@
var p: Int = 0
val arr = intArrayOf(1, 2, 3)
class C {
var p: Int = 0
operator fun get(i: Int) = i
operator fun set(i: Int, value: Int) {}
}
object O {
var p: Int = 0
operator fun get(i: Int) = i
operator fun set(i: Int, value: Int) {}
}
fun testVarPrefix() {
var x = 0
val x1 = ++x
@@ -20,7 +32,7 @@ fun testPropPrefix() {
fun testPropPostfix() {
val p1 = p++
val p2 = --p
val p2 = p--
}
fun testArrayPrefix() {
@@ -31,4 +43,44 @@ fun testArrayPrefix() {
fun testArrayPostfix() {
val a1 = arr[0]++
val a2 = arr[0]--
}
}
fun testClassPropPrefix() {
val p1 = ++C().p
val p2 = --C().p
}
fun testClassPropPostfix() {
val p1 = C().p++
val p2 = C().p--
}
fun testClassOperatorPrefix() {
val a1 = ++C()[0]
val a2 = --C()[0]
}
fun testClassOperatorPostfix() {
val a1 = C()[0]++
val a2 = C()[0]--
}
fun testObjectPropPrefix() {
val p1 = ++O.p
val p2 = --O.p
}
fun testObjectPropPostfix() {
val p1 = O.p++
val p2 = O.p--
}
fun testObjectOperatorPrefix() {
val a1 = ++O[0]
val a2 = --O[0]
}
fun testObjectOperatorPostfix() {
val a1 = O[0]++
val a2 = O[0]--
}
@@ -7,6 +7,48 @@ val arr: IntArray
field = intArrayOf(elements = [1, 2, 3])
get
class C {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
var p: Int
field = 0
get
set
operator fun get(i: Int): Int {
return i
}
operator fun set(i: Int, value: Int) {
}
}
object O {
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
var p: Int
field = 0
get
set
operator fun get(i: Int): Int {
return i
}
operator fun set(i: Int, value: Int) {
}
}
fun testVarPrefix() {
var x: Int = 0
val x1: Int = { // BLOCK
@@ -58,8 +100,9 @@ fun testPropPostfix() {
}
val p2: Int = { // BLOCK
{ // BLOCK
<set-p>(<set-?> = <get-p>().dec())
<get-p>()
val tmp1: Int = <get-p>()
<set-p>(<set-?> = tmp1.dec())
tmp1
}
}
}
@@ -95,3 +138,139 @@ fun testArrayPostfix() {
tmp5
}
}
fun testClassPropPrefix() {
val p1: Int = { // BLOCK
val tmp0_this: C = C()
{ // BLOCK
tmp0_this.<set-p>(<set-?> = tmp0_this.<get-p>().inc())
tmp0_this.<get-p>()
}
}
val p2: Int = { // BLOCK
val tmp1_this: C = C()
{ // BLOCK
tmp1_this.<set-p>(<set-?> = tmp1_this.<get-p>().dec())
tmp1_this.<get-p>()
}
}
}
fun testClassPropPostfix() {
val p1: Int = { // BLOCK
val tmp0_this: C = C()
{ // BLOCK
val tmp1: Int = tmp0_this.<get-p>()
tmp0_this.<set-p>(<set-?> = tmp1.inc())
tmp1
}
}
val p2: Int = { // BLOCK
val tmp2_this: C = C()
{ // BLOCK
val tmp3: Int = tmp2_this.<get-p>()
tmp2_this.<set-p>(<set-?> = tmp3.dec())
tmp3
}
}
}
fun testClassOperatorPrefix() {
val a1: Int = { // BLOCK
val tmp0_array: C = C()
val tmp1_index0: Int = 0
tmp0_array.set(i = tmp1_index0, value = tmp0_array.get(i = tmp1_index0).inc())
tmp0_array.get(i = tmp1_index0)
}
val a2: Int = { // BLOCK
val tmp2_array: C = C()
val tmp3_index0: Int = 0
tmp2_array.set(i = tmp3_index0, value = tmp2_array.get(i = tmp3_index0).dec())
tmp2_array.get(i = tmp3_index0)
}
}
fun testClassOperatorPostfix() {
val a1: Int = { // BLOCK
val tmp0_array: C = C()
val tmp1_index0: Int = 0
val tmp2: Int = tmp0_array.get(i = tmp1_index0)
tmp0_array.set(i = tmp1_index0, value = tmp2.inc())
tmp2
}
val a2: Int = { // BLOCK
val tmp3_array: C = C()
val tmp4_index0: Int = 0
val tmp5: Int = tmp3_array.get(i = tmp4_index0)
tmp3_array.set(i = tmp4_index0, value = tmp5.dec())
tmp5
}
}
fun testObjectPropPrefix() {
val p1: Int = { // BLOCK
val tmp0_this: O = O
{ // BLOCK
tmp0_this.<set-p>(<set-?> = tmp0_this.<get-p>().inc())
tmp0_this.<get-p>()
}
}
val p2: Int = { // BLOCK
val tmp1_this: O = O
{ // BLOCK
tmp1_this.<set-p>(<set-?> = tmp1_this.<get-p>().dec())
tmp1_this.<get-p>()
}
}
}
fun testObjectPropPostfix() {
val p1: Int = { // BLOCK
val tmp0_this: O = O
{ // BLOCK
val tmp1: Int = tmp0_this.<get-p>()
tmp0_this.<set-p>(<set-?> = tmp1.inc())
tmp1
}
}
val p2: Int = { // BLOCK
val tmp2_this: O = O
{ // BLOCK
val tmp3: Int = tmp2_this.<get-p>()
tmp2_this.<set-p>(<set-?> = tmp3.dec())
tmp3
}
}
}
fun testObjectOperatorPrefix() {
val a1: Int = { // BLOCK
val tmp0_array: O = O
val tmp1_index0: Int = 0
tmp0_array.set(i = tmp1_index0, value = tmp0_array.get(i = tmp1_index0).inc())
tmp0_array.get(i = tmp1_index0)
}
val a2: Int = { // BLOCK
val tmp2_array: O = O
val tmp3_index0: Int = 0
tmp2_array.set(i = tmp3_index0, value = tmp2_array.get(i = tmp3_index0).dec())
tmp2_array.get(i = tmp3_index0)
}
}
fun testObjectOperatorPostfix() {
val a1: Int = { // BLOCK
val tmp0_array: O = O
val tmp1_index0: Int = 0
val tmp2: Int = tmp0_array.get(i = tmp1_index0)
tmp0_array.set(i = tmp1_index0, value = tmp2.inc())
tmp2
}
val a2: Int = { // BLOCK
val tmp3_array: O = O
val tmp4_index0: Int = 0
val tmp5: Int = tmp3_array.get(i = tmp4_index0)
tmp3_array.set(i = tmp4_index0, value = tmp5.dec())
tmp5
}
}
@@ -711,6 +711,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/PackageQualified.kt");
}
@Test
@TestMetadata("prefixIncReturnType.kt")
public void testPrefixIncReturnType() throws Exception {
runTest("compiler/testData/diagnostics/tests/prefixIncReturnType.kt");
}
@Test
@TestMetadata("prefixIncSmartCast.kt")
public void testPrefixIncSmartCast() throws Exception {
runTest("compiler/testData/diagnostics/tests/prefixIncSmartCast.kt");
}
@Test
@TestMetadata("PrimaryConstructors.kt")
public void testPrimaryConstructors() throws Exception {
@@ -25955,12 +25955,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt");
}
@Test
@TestMetadata("prefixIncDecFir.kt")
public void testPrefixIncDecFir() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDecFir.kt");
}
@Test
@TestMetadata("rangeFromCollection.kt")
public void testRangeFromCollection() throws Exception {
@@ -46903,24 +46897,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/statics/incInClassObject.kt");
}
@Test
@TestMetadata("incInClassObjectFir.kt")
public void testIncInClassObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInClassObjectFir.kt");
}
@Test
@TestMetadata("incInObject.kt")
public void testIncInObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObject.kt");
}
@Test
@TestMetadata("incInObjectFir.kt")
public void testIncInObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObjectFir.kt");
}
@Test
@TestMetadata("inheritedPropertyInClassObject.kt")
public void testInheritedPropertyInClassObject() throws Exception {
@@ -26933,12 +26933,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt");
}
@Test
@TestMetadata("prefixIncDecFir.kt")
public void testPrefixIncDecFir() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDecFir.kt");
}
@Test
@TestMetadata("rangeFromCollection.kt")
public void testRangeFromCollection() throws Exception {
@@ -49309,24 +49303,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/statics/incInClassObject.kt");
}
@Test
@TestMetadata("incInClassObjectFir.kt")
public void testIncInClassObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInClassObjectFir.kt");
}
@Test
@TestMetadata("incInObject.kt")
public void testIncInObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObject.kt");
}
@Test
@TestMetadata("incInObjectFir.kt")
public void testIncInObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObjectFir.kt");
}
@Test
@TestMetadata("inheritedPropertyInClassObject.kt")
public void testInheritedPropertyInClassObject() throws Exception {
@@ -26933,12 +26933,6 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt");
}
@Test
@TestMetadata("prefixIncDecFir.kt")
public void testPrefixIncDecFir() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDecFir.kt");
}
@Test
@TestMetadata("rangeFromCollection.kt")
public void testRangeFromCollection() throws Exception {
@@ -49309,24 +49303,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
runTest("compiler/testData/codegen/box/statics/incInClassObject.kt");
}
@Test
@TestMetadata("incInClassObjectFir.kt")
public void testIncInClassObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInClassObjectFir.kt");
}
@Test
@TestMetadata("incInObject.kt")
public void testIncInObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObject.kt");
}
@Test
@TestMetadata("incInObjectFir.kt")
public void testIncInObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObjectFir.kt");
}
@Test
@TestMetadata("inheritedPropertyInClassObject.kt")
public void testInheritedPropertyInClassObject() throws Exception {
@@ -21836,11 +21836,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt");
}
@TestMetadata("prefixIncDecFir.kt")
public void testPrefixIncDecFir() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDecFir.kt");
}
@TestMetadata("rangeFromCollection.kt")
public void testRangeFromCollection() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt");
@@ -37989,21 +37984,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/statics/incInClassObject.kt");
}
@TestMetadata("incInClassObjectFir.kt")
public void testIncInClassObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInClassObjectFir.kt");
}
@TestMetadata("incInObject.kt")
public void testIncInObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObject.kt");
}
@TestMetadata("incInObjectFir.kt")
public void testIncInObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObjectFir.kt");
}
@TestMetadata("inheritedPropertyInClassObject.kt")
public void testInheritedPropertyInClassObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/inheritedPropertyInClassObject.kt");
@@ -40,9 +40,6 @@ object SpecialNames {
@JvmField
val UNARY = Name.special("<unary>")
@JvmField
val UNARY_RESULT = Name.special("<unary-result>")
@JvmField
val THIS = Name.special("<this>")
@@ -20857,12 +20857,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt");
}
@Test
@TestMetadata("prefixIncDecFir.kt")
public void testPrefixIncDecFir() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDecFir.kt");
}
@Test
@TestMetadata("rangeFromCollection.kt")
public void testRangeFromCollection() throws Exception {
@@ -34797,24 +34791,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/statics/incInClassObject.kt");
}
@Test
@TestMetadata("incInClassObjectFir.kt")
public void testIncInClassObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInClassObjectFir.kt");
}
@Test
@TestMetadata("incInObject.kt")
public void testIncInObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObject.kt");
}
@Test
@TestMetadata("incInObjectFir.kt")
public void testIncInObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObjectFir.kt");
}
@Test
@TestMetadata("inheritedPropertyInClassObject.kt")
public void testInheritedPropertyInClassObject() throws Exception {
@@ -20875,12 +20875,6 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt");
}
@Test
@TestMetadata("prefixIncDecFir.kt")
public void testPrefixIncDecFir() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDecFir.kt");
}
@Test
@TestMetadata("rangeFromCollection.kt")
public void testRangeFromCollection() throws Exception {
@@ -34983,24 +34977,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/statics/incInClassObject.kt");
}
@Test
@TestMetadata("incInClassObjectFir.kt")
public void testIncInClassObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInClassObjectFir.kt");
}
@Test
@TestMetadata("incInObject.kt")
public void testIncInObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObject.kt");
}
@Test
@TestMetadata("incInObjectFir.kt")
public void testIncInObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObjectFir.kt");
}
@Test
@TestMetadata("inheritedPropertyInClassObject.kt")
public void testInheritedPropertyInClassObject() throws Exception {
@@ -20875,12 +20875,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt");
}
@Test
@TestMetadata("prefixIncDecFir.kt")
public void testPrefixIncDecFir() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDecFir.kt");
}
@Test
@TestMetadata("rangeFromCollection.kt")
public void testRangeFromCollection() throws Exception {
@@ -34983,24 +34977,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/statics/incInClassObject.kt");
}
@Test
@TestMetadata("incInClassObjectFir.kt")
public void testIncInClassObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInClassObjectFir.kt");
}
@Test
@TestMetadata("incInObject.kt")
public void testIncInObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObject.kt");
}
@Test
@TestMetadata("incInObjectFir.kt")
public void testIncInObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObjectFir.kt");
}
@Test
@TestMetadata("inheritedPropertyInClassObject.kt")
public void testInheritedPropertyInClassObject() throws Exception {
@@ -20875,12 +20875,6 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt");
}
@Test
@TestMetadata("prefixIncDecFir.kt")
public void testPrefixIncDecFir() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDecFir.kt");
}
@Test
@TestMetadata("rangeFromCollection.kt")
public void testRangeFromCollection() throws Exception {
@@ -34983,24 +34977,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
runTest("compiler/testData/codegen/box/statics/incInClassObject.kt");
}
@Test
@TestMetadata("incInClassObjectFir.kt")
public void testIncInClassObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInClassObjectFir.kt");
}
@Test
@TestMetadata("incInObject.kt")
public void testIncInObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObject.kt");
}
@Test
@TestMetadata("incInObjectFir.kt")
public void testIncInObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObjectFir.kt");
}
@Test
@TestMetadata("inheritedPropertyInClassObject.kt")
public void testInheritedPropertyInClassObject() throws Exception {
+1 -2
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_K2: JS_IR
// EXPECTED_REACHABLE_NODES: 1294
package foo
@@ -56,4 +55,4 @@ fun box(): String {
}
return "OK"
}
}
@@ -24019,12 +24019,6 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt");
}
@Test
@TestMetadata("prefixIncDecFir.kt")
public void testPrefixIncDecFir() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDecFir.kt");
}
@Test
@TestMetadata("rangeFromCollection.kt")
public void testRangeFromCollection() throws Exception {
@@ -39053,24 +39047,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
runTest("compiler/testData/codegen/box/statics/incInClassObject.kt");
}
@Test
@TestMetadata("incInClassObjectFir.kt")
public void testIncInClassObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInClassObjectFir.kt");
}
@Test
@TestMetadata("incInObject.kt")
public void testIncInObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObject.kt");
}
@Test
@TestMetadata("incInObjectFir.kt")
public void testIncInObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObjectFir.kt");
}
@Test
@TestMetadata("inheritedPropertyInClassObject.kt")
public void testInheritedPropertyInClassObject() throws Exception {
@@ -23797,12 +23797,6 @@ public class K1NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTes
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt");
}
@Test
@TestMetadata("prefixIncDecFir.kt")
public void testPrefixIncDecFir() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDecFir.kt");
}
@Test
@TestMetadata("rangeFromCollection.kt")
public void testRangeFromCollection() throws Exception {
@@ -38571,24 +38565,12 @@ public class K1NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTes
runTest("compiler/testData/codegen/box/statics/incInClassObject.kt");
}
@Test
@TestMetadata("incInClassObjectFir.kt")
public void testIncInClassObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInClassObjectFir.kt");
}
@Test
@TestMetadata("incInObject.kt")
public void testIncInObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObject.kt");
}
@Test
@TestMetadata("incInObjectFir.kt")
public void testIncInObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObjectFir.kt");
}
@Test
@TestMetadata("inheritedPropertyInClassObject.kt")
public void testInheritedPropertyInClassObject() throws Exception {
@@ -18479,11 +18479,6 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt");
}
@TestMetadata("prefixIncDecFir.kt")
public void testPrefixIncDecFir() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/prefixIncDecFir.kt");
}
@TestMetadata("rangeFromCollection.kt")
public void testRangeFromCollection() throws Exception {
runTest("compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt");
@@ -31334,21 +31329,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
runTest("compiler/testData/codegen/box/statics/incInClassObject.kt");
}
@TestMetadata("incInClassObjectFir.kt")
public void testIncInClassObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInClassObjectFir.kt");
}
@TestMetadata("incInObject.kt")
public void testIncInObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObject.kt");
}
@TestMetadata("incInObjectFir.kt")
public void testIncInObjectFir() throws Exception {
runTest("compiler/testData/codegen/box/statics/incInObjectFir.kt");
}
@TestMetadata("inheritedPropertyInClassObject.kt")
public void testInheritedPropertyInClassObject() throws Exception {
runTest("compiler/testData/codegen/box/statics/inheritedPropertyInClassObject.kt");