KT-36956 fix back-end part in JVM and JVM_IR
PSI2IR: deparenthesize LHS expression when generating assignment receiver. FE: record 'set' operator call for code generation.
This commit is contained in:
+5
@@ -1062,6 +1062,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
|
||||
runTest("compiler/testData/ir/irText/expressions/kt30796.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36956.kt")
|
||||
public void testKt36956() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/expressions/kt36956.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaInCAO.kt")
|
||||
public void testLambdaInCAO() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/expressions/lambdaInCAO.kt");
|
||||
|
||||
+12
-3
@@ -956,7 +956,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
IElementType operationType = operationExpression.getOperationReference().getReferencedNameElementType();
|
||||
if (KtTokens.AUGMENTED_ASSIGNMENTS.contains(operationType)
|
||||
|| operationType == KtTokens.PLUSPLUS || operationType == KtTokens.MINUSMINUS) {
|
||||
ResolvedCall<?> resolvedCall = traceWithIndexedLValue.get(INDEXED_LVALUE_SET, expression);
|
||||
ResolvedCall<FunctionDescriptor> resolvedCall = traceWithIndexedLValue.get(INDEXED_LVALUE_SET, expression);
|
||||
if (resolvedCall != null && trace.wantsDiagnostics()) {
|
||||
// Call must be validated with the actual, not temporary trace in order to report operator diagnostic
|
||||
// Only unary assignment expressions (++, --) and +=/... must be checked, normal assignments have the proper trace
|
||||
@@ -971,6 +971,10 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
for (CallChecker checker : components.callCheckers) {
|
||||
checker.check(resolvedCall, expression, callCheckerContext);
|
||||
}
|
||||
// Should make sure resolved call for 'set' operator is recorded, see KT-36956.
|
||||
if (trace.get(INDEXED_LVALUE_SET, expression) == null) {
|
||||
trace.record(INDEXED_LVALUE_SET, expression, resolvedCall);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1766,8 +1770,13 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
traceForResolveResult.report(isGet ? NO_GET_METHOD.on(arrayAccessExpression) : NO_SET_METHOD.on(arrayAccessExpression));
|
||||
return resultTypeInfo.clearType();
|
||||
}
|
||||
traceForResolveResult.record(isGet ? INDEXED_LVALUE_GET : INDEXED_LVALUE_SET, arrayAccessExpression,
|
||||
functionResults.getResultingCall());
|
||||
|
||||
if (isGet) {
|
||||
traceForResolveResult.record(INDEXED_LVALUE_GET, arrayAccessExpression, functionResults.getResultingCall());
|
||||
} else {
|
||||
traceForResolveResult.record(INDEXED_LVALUE_SET, arrayAccessExpression, functionResults.getResultingCall());
|
||||
}
|
||||
|
||||
return resultTypeInfo.replaceType(functionResults.getResultingDescriptor().getReturnType());
|
||||
}
|
||||
|
||||
|
||||
+20
-28
@@ -168,16 +168,17 @@ class AssignmentGenerator(statementGenerator: StatementGenerator) : StatementGen
|
||||
origin: IrStatementOrigin,
|
||||
isAssignmentStatement: Boolean = true
|
||||
): AssignmentReceiver {
|
||||
if (ktLeft is KtArrayAccessExpression) {
|
||||
return generateArrayAccessAssignmentReceiver(ktLeft, origin)
|
||||
val ktExpr = KtPsiUtil.safeDeparenthesize(ktLeft)
|
||||
if (ktExpr is KtArrayAccessExpression) {
|
||||
return generateArrayAccessAssignmentReceiver(ktExpr, origin)
|
||||
}
|
||||
|
||||
val resolvedCall = getResolvedCall(ktLeft)
|
||||
?: return generateExpressionAssignmentReceiver(ktLeft, origin, isAssignmentStatement)
|
||||
val resolvedCall = getResolvedCall(ktExpr)
|
||||
?: return generateExpressionAssignmentReceiver(ktExpr, origin, isAssignmentStatement)
|
||||
val descriptor = resolvedCall.resultingDescriptor
|
||||
|
||||
val startOffset = ktLeft.startOffsetSkippingComments
|
||||
val endOffset = ktLeft.endOffset
|
||||
val startOffset = ktExpr.startOffsetSkippingComments
|
||||
val endOffset = ktExpr.endOffset
|
||||
return when (descriptor) {
|
||||
is SyntheticFieldDescriptor -> {
|
||||
val receiverValue =
|
||||
@@ -186,7 +187,7 @@ class AssignmentGenerator(statementGenerator: StatementGenerator) : StatementGen
|
||||
resolvedCall,
|
||||
descriptor
|
||||
)
|
||||
createBackingFieldLValue(ktLeft, descriptor.propertyDescriptor, receiverValue, origin)
|
||||
createBackingFieldLValue(ktExpr, descriptor.propertyDescriptor, receiverValue, origin)
|
||||
}
|
||||
is LocalVariableDescriptor ->
|
||||
@Suppress("DEPRECATION")
|
||||
@@ -200,13 +201,13 @@ class AssignmentGenerator(statementGenerator: StatementGenerator) : StatementGen
|
||||
origin
|
||||
)
|
||||
else
|
||||
createVariableValue(ktLeft, descriptor, origin)
|
||||
createVariableValue(ktExpr, descriptor, origin)
|
||||
is PropertyDescriptor ->
|
||||
generateAssignmentReceiverForProperty(descriptor, origin, ktLeft, resolvedCall, isAssignmentStatement)
|
||||
generateAssignmentReceiverForProperty(descriptor, origin, ktExpr, resolvedCall, isAssignmentStatement)
|
||||
is ValueDescriptor ->
|
||||
createVariableValue(ktLeft, descriptor, origin)
|
||||
createVariableValue(ktExpr, descriptor, origin)
|
||||
else ->
|
||||
OnceExpressionValue(ktLeft.genExpr())
|
||||
OnceExpressionValue(ktExpr.genExpr())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,33 +349,24 @@ class AssignmentGenerator(statementGenerator: StatementGenerator) : StatementGen
|
||||
)
|
||||
}
|
||||
|
||||
private fun getThisClass(): ClassDescriptor {
|
||||
val scopeOwner = statementGenerator.scopeOwner
|
||||
return when (scopeOwner) {
|
||||
is ClassConstructorDescriptor -> scopeOwner.containingDeclaration
|
||||
is ClassDescriptor -> scopeOwner
|
||||
else -> scopeOwner.containingDeclaration as ClassDescriptor
|
||||
}
|
||||
}
|
||||
|
||||
private fun generateArrayAccessAssignmentReceiver(
|
||||
ktLeft: KtArrayAccessExpression,
|
||||
ktArrayExpr: KtArrayAccessExpression,
|
||||
origin: IrStatementOrigin
|
||||
): ArrayAccessAssignmentReceiver {
|
||||
val indexedGetResolvedCall = get(BindingContext.INDEXED_LVALUE_GET, ktLeft)
|
||||
val indexedSetResolvedCall = get(BindingContext.INDEXED_LVALUE_SET, ktLeft)
|
||||
val indexedGetResolvedCall = get(BindingContext.INDEXED_LVALUE_GET, ktArrayExpr)
|
||||
val indexedSetResolvedCall = get(BindingContext.INDEXED_LVALUE_SET, ktArrayExpr)
|
||||
|
||||
return ArrayAccessAssignmentReceiver(
|
||||
ktLeft.arrayExpression!!.genExpr(),
|
||||
ktLeft.indexExpressions,
|
||||
ktLeft.indexExpressions.map { it.genExpr() },
|
||||
ktArrayExpr.arrayExpression!!.genExpr(),
|
||||
ktArrayExpr.indexExpressions,
|
||||
ktArrayExpr.indexExpressions.map { it.genExpr() },
|
||||
indexedGetResolvedCall,
|
||||
indexedSetResolvedCall,
|
||||
{ indexedGetResolvedCall?.let { statementGenerator.pregenerateCallReceivers(it) } },
|
||||
{ indexedSetResolvedCall?.let { statementGenerator.pregenerateCallReceivers(it) } },
|
||||
CallGenerator(statementGenerator),
|
||||
ktLeft.startOffsetSkippingComments,
|
||||
ktLeft.endOffset,
|
||||
ktArrayExpr.startOffsetSkippingComments,
|
||||
ktArrayExpr.endOffset,
|
||||
origin
|
||||
)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
class Cell(var x: Int) {
|
||||
operator fun get(i: Int) = x
|
||||
operator fun set(i: Int, v: Int) { x = v }
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val c = Cell(0)
|
||||
(c[0])++
|
||||
if (c[0] != 1) return "Fail"
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
FILE fqName:<root> fileName:/kt36956.kt
|
||||
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A<T of <root>.A>
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
CONSTRUCTOR visibility:public <> (value:T of <root>.A) returnType:<root>.A<T of <root>.A> [primary]
|
||||
VALUE_PARAMETER name:value index:0 type:T of <root>.A
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
PROPERTY name:value visibility:private modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.A visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value: T of <root>.A declared in <root>.A.<init>' type=T of <root>.A origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-value> visibility:private modality:FINAL <> ($this:<root>.A<T of <root>.A>) returnType:T of <root>.A
|
||||
correspondingProperty: PROPERTY name:value visibility:private modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A<T of <root>.A>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='private final fun <get-value> (): T of <root>.A declared in <root>.A'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.A visibility:private [final]' type=T of <root>.A origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A<T of <root>.A> declared in <root>.A.<get-value>' type=<root>.A<T of <root>.A> origin=null
|
||||
FUN name:get visibility:public modality:FINAL <> ($this:<root>.A<T of <root>.A>, i:kotlin.Int) returnType:T of <root>.A [operator]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A<T of <root>.A>
|
||||
VALUE_PARAMETER name:i index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun get (i: kotlin.Int): T of <root>.A [operator] declared in <root>.A'
|
||||
CALL 'private final fun <get-value> (): T of <root>.A declared in <root>.A' type=T of <root>.A origin=null
|
||||
$this: GET_VAR '<this>: <root>.A<T of <root>.A> declared in <root>.A.get' type=<root>.A<T of <root>.A> origin=null
|
||||
FUN name:set visibility:public modality:FINAL <> ($this:<root>.A<T of <root>.A>, i:kotlin.Int, v:T of <root>.A) returnType:kotlin.Unit [operator]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A<T of <root>.A>
|
||||
VALUE_PARAMETER name:i index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER name:v index:1 type:T of <root>.A
|
||||
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
|
||||
PROPERTY name:aFloat visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:aFloat type:<root>.A<kotlin.Float> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (value: T of <root>.A) [primary] declared in <root>.A' type=<root>.A<kotlin.Float> origin=null
|
||||
<class: T>: kotlin.Float
|
||||
value: CONST Float type=kotlin.Float value=0.0
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-aFloat> visibility:public modality:FINAL <> () returnType:<root>.A<kotlin.Float>
|
||||
correspondingProperty: PROPERTY name:aFloat visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-aFloat> (): <root>.A<kotlin.Float> declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:aFloat type:<root>.A<kotlin.Float> visibility:private [final,static]' type=<root>.A<kotlin.Float> origin=null
|
||||
PROPERTY name:aInt visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:aInt type:kotlin.Float visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Float origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Float [val]
|
||||
CALL 'public final fun get (i: kotlin.Int): kotlin.Float [operator] declared in <root>.A' type=kotlin.Float origin=null
|
||||
$this: CALL 'public final fun <get-aFloat> (): <root>.A<kotlin.Float> declared in <root>' type=<root>.A<kotlin.Float> origin=null
|
||||
i: CONST Int type=kotlin.Int value=1
|
||||
CALL 'public final fun set (i: kotlin.Int, v: kotlin.Float): kotlin.Unit [operator] declared in <root>.A' type=kotlin.Unit origin=null
|
||||
$this: CALL 'public final fun <get-aFloat> (): <root>.A<kotlin.Float> declared in <root>' type=<root>.A<kotlin.Float> origin=null
|
||||
i: CONST Int type=kotlin.Int value=1
|
||||
v: CALL 'public final fun dec (): kotlin.Float [operator] declared in kotlin.Float' type=kotlin.Float origin=null
|
||||
$this: GET_VAR 'val tmp_0: kotlin.Float [val] declared in <root>.aInt' type=kotlin.Float origin=null
|
||||
GET_VAR 'val tmp_0: kotlin.Float [val] declared in <root>.aInt' type=kotlin.Float origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-aInt> visibility:public modality:FINAL <> () returnType:kotlin.Float
|
||||
correspondingProperty: PROPERTY name:aInt visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-aInt> (): kotlin.Float declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:aInt type:kotlin.Float visibility:private [final,static]' type=kotlin.Float origin=null
|
||||
@@ -0,0 +1,8 @@
|
||||
class A<T>(private val value: T) {
|
||||
operator fun get(i: Int) = value
|
||||
operator fun set(i: Int, v: T) {}
|
||||
}
|
||||
|
||||
val aFloat = A<Float>(0.0f)
|
||||
|
||||
val aInt = (aFloat[1])--
|
||||
@@ -0,0 +1,79 @@
|
||||
FILE fqName:<root> fileName:/kt36956.kt
|
||||
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A<T of <root>.A>
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
CONSTRUCTOR visibility:public <> (value:T of <root>.A) returnType:<root>.A<T of <root>.A> [primary]
|
||||
VALUE_PARAMETER name:value index:0 type:T of <root>.A
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
PROPERTY name:value visibility:private modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.A visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value: T of <root>.A declared in <root>.A.<init>' type=T of <root>.A origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-value> visibility:private modality:FINAL <> ($this:<root>.A<T of <root>.A>) returnType:T of <root>.A
|
||||
correspondingProperty: PROPERTY name:value visibility:private modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A<T of <root>.A>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='private final fun <get-value> (): T of <root>.A declared in <root>.A'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.A visibility:private [final]' type=T of <root>.A origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A<T of <root>.A> declared in <root>.A.<get-value>' type=<root>.A<T of <root>.A> origin=null
|
||||
FUN name:get visibility:public modality:FINAL <> ($this:<root>.A<T of <root>.A>, i:kotlin.Int) returnType:T of <root>.A [operator]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A<T of <root>.A>
|
||||
VALUE_PARAMETER name:i index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun get (i: kotlin.Int): T of <root>.A [operator] declared in <root>.A'
|
||||
CALL 'private final fun <get-value> (): T of <root>.A declared in <root>.A' type=T of <root>.A origin=GET_PROPERTY
|
||||
$this: GET_VAR '<this>: <root>.A<T of <root>.A> declared in <root>.A.get' type=<root>.A<T of <root>.A> origin=null
|
||||
FUN name:set visibility:public modality:FINAL <> ($this:<root>.A<T of <root>.A>, i:kotlin.Int, v:T of <root>.A) returnType:kotlin.Unit [operator]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A<T of <root>.A>
|
||||
VALUE_PARAMETER name:i index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER name:v index:1 type:T of <root>.A
|
||||
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
|
||||
PROPERTY name:aFloat visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:aFloat type:<root>.A<kotlin.Float> visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (value: T of <root>.A) [primary] declared in <root>.A' type=<root>.A<kotlin.Float> origin=null
|
||||
<class: T>: kotlin.Float
|
||||
value: CONST Float type=kotlin.Float value=0.0
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-aFloat> visibility:public modality:FINAL <> () returnType:<root>.A<kotlin.Float>
|
||||
correspondingProperty: PROPERTY name:aFloat visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-aFloat> (): <root>.A<kotlin.Float> declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:aFloat type:<root>.A<kotlin.Float> visibility:private [final,static]' type=<root>.A<kotlin.Float> origin=null
|
||||
PROPERTY name:aInt visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:aInt type:kotlin.Float visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Float origin=POSTFIX_DECR
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.A<kotlin.Float> [val]
|
||||
CALL 'public final fun <get-aFloat> (): <root>.A<kotlin.Float> declared in <root>' type=<root>.A<kotlin.Float> origin=GET_PROPERTY
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=1
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Float [val]
|
||||
CALL 'public final fun get (i: kotlin.Int): T of <root>.A [operator] declared in <root>.A' type=kotlin.Float origin=POSTFIX_DECR
|
||||
$this: GET_VAR 'val tmp_0: <root>.A<kotlin.Float> [val] declared in <root>.aInt' type=<root>.A<kotlin.Float> origin=null
|
||||
i: GET_VAR 'val tmp_1: kotlin.Int [val] declared in <root>.aInt' type=kotlin.Int origin=null
|
||||
CALL 'public final fun set (i: kotlin.Int, v: T of <root>.A): kotlin.Unit [operator] declared in <root>.A' type=kotlin.Unit origin=POSTFIX_DECR
|
||||
$this: GET_VAR 'val tmp_0: <root>.A<kotlin.Float> [val] declared in <root>.aInt' type=<root>.A<kotlin.Float> origin=null
|
||||
i: GET_VAR 'val tmp_1: kotlin.Int [val] declared in <root>.aInt' type=kotlin.Int origin=null
|
||||
v: CALL 'public final fun dec (): kotlin.Float [operator] declared in kotlin.Float' type=kotlin.Float origin=POSTFIX_DECR
|
||||
$this: GET_VAR 'val tmp_2: kotlin.Float [val] declared in <root>.aInt' type=kotlin.Float origin=null
|
||||
GET_VAR 'val tmp_2: kotlin.Float [val] declared in <root>.aInt' type=kotlin.Float origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-aInt> visibility:public modality:FINAL <> () returnType:kotlin.Float
|
||||
correspondingProperty: PROPERTY name:aInt visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-aInt> (): kotlin.Float declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:aInt type:kotlin.Float visibility:private [final,static]' type=kotlin.Float origin=null
|
||||
+5
@@ -12692,6 +12692,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/increment/genericClassWithGetSet.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36956.kt")
|
||||
public void testKt36956() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/kt36956.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("memberExtOnLong.kt")
|
||||
public void testMemberExtOnLong() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/memberExtOnLong.kt");
|
||||
|
||||
+5
@@ -12692,6 +12692,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/increment/genericClassWithGetSet.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36956.kt")
|
||||
public void testKt36956() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/kt36956.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("memberExtOnLong.kt")
|
||||
public void testMemberExtOnLong() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/memberExtOnLong.kt");
|
||||
|
||||
+5
@@ -11562,6 +11562,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/increment/genericClassWithGetSet.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36956.kt")
|
||||
public void testKt36956() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/kt36956.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("memberExtOnLong.kt")
|
||||
public void testMemberExtOnLong() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/memberExtOnLong.kt");
|
||||
|
||||
+5
@@ -11562,6 +11562,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/increment/genericClassWithGetSet.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36956.kt")
|
||||
public void testKt36956() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/kt36956.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("memberExtOnLong.kt")
|
||||
public void testMemberExtOnLong() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/memberExtOnLong.kt");
|
||||
|
||||
@@ -1061,6 +1061,11 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
|
||||
runTest("compiler/testData/ir/irText/expressions/kt30796.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36956.kt")
|
||||
public void testKt36956() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/expressions/kt36956.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaInCAO.kt")
|
||||
public void testLambdaInCAO() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/expressions/lambdaInCAO.kt");
|
||||
|
||||
Generated
+5
@@ -9912,6 +9912,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/increment/genericClassWithGetSet.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36956.kt")
|
||||
public void testKt36956() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/kt36956.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("memberExtOnLong.kt")
|
||||
public void testMemberExtOnLong() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/memberExtOnLong.kt");
|
||||
|
||||
+5
@@ -9977,6 +9977,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/increment/genericClassWithGetSet.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36956.kt")
|
||||
public void testKt36956() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/kt36956.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("memberExtOnLong.kt")
|
||||
public void testMemberExtOnLong() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/increment/memberExtOnLong.kt");
|
||||
|
||||
Reference in New Issue
Block a user