diff --git a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java index 40f279a9ddf..b1bf3107ddd 100644 --- a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java @@ -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"); diff --git a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/BasicExpressionTypingVisitor.java b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/BasicExpressionTypingVisitor.java index 51a7124e2d1..7c631af490d 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/BasicExpressionTypingVisitor.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/BasicExpressionTypingVisitor.java @@ -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 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()); } diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/AssignmentGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/AssignmentGenerator.kt index d0681083c7a..79c57510eab 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/AssignmentGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/AssignmentGenerator.kt @@ -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 ) } diff --git a/compiler/testData/codegen/box/increment/kt36956.kt b/compiler/testData/codegen/box/increment/kt36956.kt new file mode 100644 index 00000000000..ba9fe2f0f37 --- /dev/null +++ b/compiler/testData/codegen/box/increment/kt36956.kt @@ -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" +} \ No newline at end of file diff --git a/compiler/testData/ir/irText/expressions/kt36956.fir.txt b/compiler/testData/ir/irText/expressions/kt36956.fir.txt new file mode 100644 index 00000000000..01b1e99277e --- /dev/null +++ b/compiler/testData/ir/irText/expressions/kt36956.fir.txt @@ -0,0 +1,75 @@ +FILE fqName: fileName:/kt36956.kt + CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A.A> + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] + CONSTRUCTOR visibility:public <> (value:T of .A) returnType:.A.A> [primary] + VALUE_PARAMETER name:value index:0 type:T of .A + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [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 .A visibility:private [final] + EXPRESSION_BODY + GET_VAR 'value: T of .A declared in .A.' type=T of .A origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> ($this:.A.A>) returnType:T of .A + correspondingProperty: PROPERTY name:value visibility:private modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.A.A> + BLOCK_BODY + RETURN type=kotlin.Nothing from='private final fun (): T of .A declared in .A' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .A visibility:private [final]' type=T of .A origin=null + receiver: GET_VAR ': .A.A> declared in .A.' type=.A.A> origin=null + FUN name:get visibility:public modality:FINAL <> ($this:.A.A>, i:kotlin.Int) returnType:T of .A [operator] + $this: VALUE_PARAMETER name: type:.A.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 .A [operator] declared in .A' + CALL 'private final fun (): T of .A declared in .A' type=T of .A origin=null + $this: GET_VAR ': .A.A> declared in .A.get' type=.A.A> origin=null + FUN name:set visibility:public modality:FINAL <> ($this:.A.A>, i:kotlin.Int, v:T of .A) returnType:kotlin.Unit [operator] + $this: VALUE_PARAMETER name: type:.A.A> + VALUE_PARAMETER name:i index:0 type:kotlin.Int + VALUE_PARAMETER name:v index:1 type:T of .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: 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: 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: type:kotlin.Any + PROPERTY name:aFloat visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:aFloat type:.A visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor (value: T of .A) [primary] declared in .A' type=.A origin=null + : kotlin.Float + value: CONST Float type=kotlin.Float value=0.0 + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.A + correspondingProperty: PROPERTY name:aFloat visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .A declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:aFloat type:.A visibility:private [final,static]' type=.A 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 .A' type=kotlin.Float origin=null + $this: CALL 'public final fun (): .A declared in ' type=.A 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 .A' type=kotlin.Unit origin=null + $this: CALL 'public final fun (): .A declared in ' type=.A 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 .aInt' type=kotlin.Float origin=null + GET_VAR 'val tmp_0: kotlin.Float [val] declared in .aInt' type=kotlin.Float origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: 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 (): kotlin.Float declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:aInt type:kotlin.Float visibility:private [final,static]' type=kotlin.Float origin=null diff --git a/compiler/testData/ir/irText/expressions/kt36956.kt b/compiler/testData/ir/irText/expressions/kt36956.kt new file mode 100644 index 00000000000..7e23d944f54 --- /dev/null +++ b/compiler/testData/ir/irText/expressions/kt36956.kt @@ -0,0 +1,8 @@ +class A(private val value: T) { + operator fun get(i: Int) = value + operator fun set(i: Int, v: T) {} +} + +val aFloat = A(0.0f) + +val aInt = (aFloat[1])-- \ No newline at end of file diff --git a/compiler/testData/ir/irText/expressions/kt36956.txt b/compiler/testData/ir/irText/expressions/kt36956.txt new file mode 100644 index 00000000000..59acacd179a --- /dev/null +++ b/compiler/testData/ir/irText/expressions/kt36956.txt @@ -0,0 +1,79 @@ +FILE fqName: fileName:/kt36956.kt + CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A.A> + TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] + CONSTRUCTOR visibility:public <> (value:T of .A) returnType:.A.A> [primary] + VALUE_PARAMETER name:value index:0 type:T of .A + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [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 .A visibility:private [final] + EXPRESSION_BODY + GET_VAR 'value: T of .A declared in .A.' type=T of .A origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> ($this:.A.A>) returnType:T of .A + correspondingProperty: PROPERTY name:value visibility:private modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.A.A> + BLOCK_BODY + RETURN type=kotlin.Nothing from='private final fun (): T of .A declared in .A' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .A visibility:private [final]' type=T of .A origin=null + receiver: GET_VAR ': .A.A> declared in .A.' type=.A.A> origin=null + FUN name:get visibility:public modality:FINAL <> ($this:.A.A>, i:kotlin.Int) returnType:T of .A [operator] + $this: VALUE_PARAMETER name: type:.A.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 .A [operator] declared in .A' + CALL 'private final fun (): T of .A declared in .A' type=T of .A origin=GET_PROPERTY + $this: GET_VAR ': .A.A> declared in .A.get' type=.A.A> origin=null + FUN name:set visibility:public modality:FINAL <> ($this:.A.A>, i:kotlin.Int, v:T of .A) returnType:kotlin.Unit [operator] + $this: VALUE_PARAMETER name: type:.A.A> + VALUE_PARAMETER name:i index:0 type:kotlin.Int + VALUE_PARAMETER name:v index:1 type:T of .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: 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: 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: type:kotlin.Any + PROPERTY name:aFloat visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:aFloat type:.A visibility:private [final,static] + EXPRESSION_BODY + CONSTRUCTOR_CALL 'public constructor (value: T of .A) [primary] declared in .A' type=.A origin=null + : kotlin.Float + value: CONST Float type=kotlin.Float value=0.0 + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.A + correspondingProperty: PROPERTY name:aFloat visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): .A declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:aFloat type:.A visibility:private [final,static]' type=.A 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:.A [val] + CALL 'public final fun (): .A declared in ' type=.A 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 .A [operator] declared in .A' type=kotlin.Float origin=POSTFIX_DECR + $this: GET_VAR 'val tmp_0: .A [val] declared in .aInt' type=.A origin=null + i: GET_VAR 'val tmp_1: kotlin.Int [val] declared in .aInt' type=kotlin.Int origin=null + CALL 'public final fun set (i: kotlin.Int, v: T of .A): kotlin.Unit [operator] declared in .A' type=kotlin.Unit origin=POSTFIX_DECR + $this: GET_VAR 'val tmp_0: .A [val] declared in .aInt' type=.A origin=null + i: GET_VAR 'val tmp_1: kotlin.Int [val] declared in .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 .aInt' type=kotlin.Float origin=null + GET_VAR 'val tmp_2: kotlin.Float [val] declared in .aInt' type=kotlin.Float origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: 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 (): kotlin.Float declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:aInt type:kotlin.Float visibility:private [final,static]' type=kotlin.Float origin=null diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 3723e5f00d3..0e0680ff86e 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -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"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 28a2dfb7707..175102424c8 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -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"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java index 010133dc643..a382e58376e 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java @@ -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"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index cc26c932748..1006c1a1f24 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -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"); diff --git a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java index edc0b691c3e..99d33b339e0 100644 --- a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java @@ -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"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index 98d3793e980..824c0bf0b6f 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -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"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 2f3b5fc7f16..cde042485a7 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -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");