diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/AsmUtil.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/AsmUtil.java index 32eaf17cc66..69fe13857d3 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/AsmUtil.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/AsmUtil.java @@ -557,22 +557,31 @@ public class AsmUtil { } public static void genIncrement(Type expectedType, int myDelta, InstructionAdapter v) { - if (expectedType == Type.LONG_TYPE) { - v.lconst(myDelta); + numConst(myDelta, expectedType, v); + v.add(expectedType); + } + + public static void numConst(int value, Type type, InstructionAdapter v) { + if (type == Type.FLOAT_TYPE) { + v.fconst(value); } - else if (expectedType == Type.FLOAT_TYPE) { - v.fconst(myDelta); + else if (type == Type.DOUBLE_TYPE) { + v.dconst(value); } - else if (expectedType == Type.DOUBLE_TYPE) { - v.dconst(myDelta); + else if (type == Type.LONG_TYPE) { + v.lconst(value); + } + else if (type == Type.CHAR_TYPE || type == Type.BYTE_TYPE || type == Type.SHORT_TYPE || type == Type.INT_TYPE) { + v.iconst(value); } else { - v.iconst(myDelta); - v.add(Type.INT_TYPE); - StackValue.coerce(Type.INT_TYPE, expectedType, v); - return; + throw new IllegalArgumentException("Primitive numeric type expected, got: " + type); } - v.add(expectedType); + } + + public static void genIncrement(Type expectedType, Type baseType, int myDelta, InstructionAdapter v) { + genIncrement(baseType, myDelta, v); + StackValue.coerce(baseType, expectedType, v); } public static void swap(InstructionAdapter v, Type stackTop, Type afterTop) { diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java index 79654e3e4ed..cf7fb5b2d22 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java @@ -3319,26 +3319,31 @@ public class ExpressionCodegen extends KtVisitor impleme return StackValue.operation(asmBaseType, new Function1() { @Override public Unit invoke(InstructionAdapter v) { - StackValue value = gen(expression.getBaseExpression()); - value = StackValue.complexWriteReadReceiver(value); + StackValue value = StackValue.complexWriteReadReceiver(gen(expression.getBaseExpression())); - Type type = expressionType(expression.getBaseExpression()); - value.put(type, v); // old value + value.put(asmBaseType, v); + AsmUtil.dup(v, asmBaseType); - value.dup(v, true); + StackValue previousValue = StackValue.local(myFrameMap.enterTemp(asmBaseType), asmBaseType); + previousValue.store(StackValue.onStack(asmBaseType), v); Type storeType; if (isPrimitiveNumberClassDescriptor && AsmUtil.isPrimitive(asmBaseType)) { - genIncrement(asmResultType, increment, v); - storeType = type; + genIncrement(asmResultType, asmBaseType, increment, v); + storeType = asmBaseType; } else { - StackValue result = invokeFunction(resolvedCall, StackValue.onStack(type)); + StackValue result = invokeFunction(resolvedCall, StackValue.onStack(asmBaseType)); result.put(result.type, v); storeType = result.type; } value.store(StackValue.onStack(storeType), v, true); + + previousValue.put(asmBaseType, v); + + myFrameMap.leaveTemp(asmBaseType); + return Unit.INSTANCE; } }); diff --git a/compiler/testData/codegen/box/operatorConventions/nestedMaps.kt b/compiler/testData/codegen/box/operatorConventions/nestedMaps.kt new file mode 100644 index 00000000000..b459a515d6a --- /dev/null +++ b/compiler/testData/codegen/box/operatorConventions/nestedMaps.kt @@ -0,0 +1,13 @@ +object Map1 { + operator fun get(i: Int, j: Int) = Map2 +} + +object Map2 { + operator fun get(i: Int, j: Int) = 0 + operator fun set(i: Int, j: Int, newValue: Int) {} +} + +fun box(): String { + Map1[0, 0][0, 0]++ + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/arrayElement.kt b/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/arrayElement.kt new file mode 100644 index 00000000000..e74d4d23515 --- /dev/null +++ b/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/arrayElement.kt @@ -0,0 +1,69 @@ +fun box(): String { + val aByte: Array = arrayOf(1) + val bByte: ByteArray = byteArrayOf(1) + + val aShort: Array = arrayOf(1) + val bShort: ShortArray = shortArrayOf(1) + + val aInt: Array = arrayOf(1) + val bInt: IntArray = intArrayOf(1) + + val aLong: Array = arrayOf(1) + val bLong: LongArray = longArrayOf(1) + + val aFloat: Array = arrayOf(1.0f) + val bFloat: FloatArray = floatArrayOf(1.0f) + + val aDouble: Array = arrayOf(1.0) + val bDouble: DoubleArray = doubleArrayOf(1.0) + + aByte[0]-- + bByte[0]-- + if (aByte[0] != bByte[0]) return "Failed post-decrement Byte: ${aByte[0]} != ${bByte[0]}" + + aByte[0]++ + bByte[0]++ + if (aByte[0] != bByte[0]) return "Failed post-increment Byte: ${aByte[0]} != ${bByte[0]}" + + aShort[0]-- + bShort[0]-- + if (aShort[0] != bShort[0]) return "Failed post-decrement Short: ${aShort[0]} != ${bShort[0]}" + + aShort[0]++ + bShort[0]++ + if (aShort[0] != bShort[0]) return "Failed post-increment Short: ${aShort[0]} != ${bShort[0]}" + + aInt[0]-- + bInt[0]-- + if (aInt[0] != bInt[0]) return "Failed post-decrement Int: ${aInt[0]} != ${bInt[0]}" + + aInt[0]++ + bInt[0]++ + if (aInt[0] != bInt[0]) return "Failed post-increment Int: ${aInt[0]} != ${bInt[0]}" + + aLong[0]-- + bLong[0]-- + if (aLong[0] != bLong[0]) return "Failed post-decrement Long: ${aLong[0]} != ${bLong[0]}" + + aLong[0]++ + bLong[0]++ + if (aLong[0] != bLong[0]) return "Failed post-increment Long: ${aLong[0]} != ${bLong[0]}" + + aFloat[0]++ + bFloat[0]++ + if (aFloat[0] != bFloat[0]) return "Failed post-increment Float: ${aFloat[0]} != ${bFloat[0]}" + + aFloat[0]-- + bFloat[0]-- + if (aFloat[0] != bFloat[0]) return "Failed post-decrement Float: ${aFloat[0]} != ${bFloat[0]}" + + aDouble[0]++ + bDouble[0]++ + if (aDouble[0] != bDouble[0]) return "Failed post-increment Double: ${aDouble[0]} != ${bDouble[0]}" + + aDouble[0]-- + bDouble[0]-- + if (aDouble[0] != bDouble[0]) return "Failed post-decrement Double: ${aDouble[0]} != ${bDouble[0]}" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/classNaryGetSet.kt b/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/classNaryGetSet.kt new file mode 100644 index 00000000000..121ace263e0 --- /dev/null +++ b/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/classNaryGetSet.kt @@ -0,0 +1,15 @@ +object A { + var x = 0 + + operator fun get(i1: Int, i2: Int, i3: Int): Int = x + + operator fun set(i1: Int, i2: Int, i3: Int, value: Int) { + x = value + } +} + +fun box(): String { + A.x = 0 + val xx = A[1, 2, 3]++ + return if (xx != 0 || A.x != 1) "Failed" else "OK" +} diff --git a/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/classWithGetSet.kt b/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/classWithGetSet.kt new file mode 100644 index 00000000000..97d2925acb4 --- /dev/null +++ b/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/classWithGetSet.kt @@ -0,0 +1,117 @@ +class AByte(var value: Byte) { + operator fun get(i: Int) = value + + operator fun set(i: Int, newValue: Byte) { + value = newValue + } +} + +class AShort(var value: Short) { + operator fun get(i: Int) = value + + operator fun set(i: Int, newValue: Short) { + value = newValue + } +} + +class AInt(var value: Int) { + operator fun get(i: Int) = value + + operator fun set(i: Int, newValue: Int) { + value = newValue + } +} + +class ALong(var value: Long) { + operator fun get(i: Int) = value + + operator fun set(i: Int, newValue: Long) { + value = newValue + } +} + +class AFloat(var value: Float) { + operator fun get(i: Int) = value + + operator fun set(i: Int, newValue: Float) { + value = newValue + } +} + +class ADouble(var value: Double) { + operator fun get(i: Int) = value + + operator fun set(i: Int, newValue: Double) { + value = newValue + } +} + +fun box(): String { + val aByte = AByte(1) + var bByte: Byte = 1 + + val aShort = AShort(1) + var bShort: Short = 1 + + val aInt = AInt(1) + var bInt: Int = 1 + + val aLong = ALong(1) + var bLong: Long = 1 + + val aFloat = AFloat(1.0f) + var bFloat: Float = 1.0f + + val aDouble = ADouble(1.0) + var bDouble: Double = 1.0 + + aByte[0]++ + bByte++ + if (aByte[0] != bByte) return "Failed post-increment Byte: ${aByte[0]} != $bByte" + + aByte[0]-- + bByte-- + if (aByte[0] != bByte) return "Failed post-decrement Byte: ${aByte[0]} != $bByte" + + aShort[0]++ + bShort++ + if (aShort[0] != bShort) return "Failed post-increment Short: ${aShort[0]} != $bShort" + + aShort[0]-- + bShort-- + if (aShort[0] != bShort) return "Failed post-decrement Short: ${aShort[0]} != $bShort" + + aInt[0]++ + bInt++ + if (aInt[0] != bInt) return "Failed post-increment Int: ${aInt[0]} != $bInt" + + aInt[0]-- + bInt-- + if (aInt[0] != bInt) return "Failed post-decrement Int: ${aInt[0]} != $bInt" + + aLong[0]++ + bLong++ + if (aLong[0] != bLong) return "Failed post-increment Long: ${aLong[0]} != $bLong" + + aLong[0]-- + bLong-- + if (aLong[0] != bLong) return "Failed post-decrement Long: ${aLong[0]} != $bLong" + + aFloat[0]++ + bFloat++ + if (aFloat[0] != bFloat) return "Failed post-increment Float: ${aFloat[0]} != $bFloat" + + aFloat[0]-- + bFloat-- + if (aFloat[0] != bFloat) return "Failed post-decrement Float: ${aFloat[0]} != $bFloat" + + aDouble[0]++ + bDouble++ + if (aDouble[0] != bDouble) return "Failed post-increment Double: ${aDouble[0]} != $bDouble" + + aDouble[0]-- + bDouble-- + if (aDouble[0] != bDouble) return "Failed post-decrement Double: ${aDouble[0]} != $bDouble" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/extOnLong.kt b/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/extOnLong.kt new file mode 100644 index 00000000000..9dce4e9da95 --- /dev/null +++ b/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/extOnLong.kt @@ -0,0 +1,8 @@ +operator fun Long.get(i: Int) = this +operator fun Long.set(i: Int, newValue: Long) {} + +fun box(): String { + var x = 0L + val y = x[0]++ + return if (y == 0L) "OK" else "Failed, y=$y" +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/genericClassWithGetSet.kt b/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/genericClassWithGetSet.kt new file mode 100644 index 00000000000..04825a34f6c --- /dev/null +++ b/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/genericClassWithGetSet.kt @@ -0,0 +1,77 @@ +class A(var value: T) { + operator fun get(i: Int) = value + + operator fun set(i: Int, newValue: T) { + value = newValue + } +} + +fun box(): String { + val aByte = A(1) + var bByte: Byte = 1 + + val aShort = A(1) + var bShort: Short = 1 + + val aInt = A(1) + var bInt: Int = 1 + + val aLong = A(1) + var bLong: Long = 1 + + val aFloat = A(1.0f) + var bFloat: Float = 1.0f + + val aDouble = A(1.0) + var bDouble: Double = 1.0 + + aByte[0]++ + bByte++ + if (aByte[0] != bByte) return "Failed post-increment Byte: ${aByte[0]} != $bByte" + + aByte[0]-- + bByte-- + if (aByte[0] != bByte) return "Failed post-decrement Byte: ${aByte[0]} != $bByte" + + aShort[0]++ + bShort++ + if (aShort[0] != bShort) return "Failed post-increment Short: ${aShort[0]} != $bShort" + + aShort[0]-- + bShort-- + if (aShort[0] != bShort) return "Failed post-decrement Short: ${aShort[0]} != $bShort" + + aInt[0]++ + bInt++ + if (aInt[0] != bInt) return "Failed post-increment Int: ${aInt[0]} != $bInt" + + aInt[0]-- + bInt-- + if (aInt[0] != bInt) return "Failed post-decrement Int: ${aInt[0]} != $bInt" + + aLong[0]++ + bLong++ + if (aLong[0] != bLong) return "Failed post-increment Long: ${aLong[0]} != $bLong" + + aLong[0]-- + bLong-- + if (aLong[0] != bLong) return "Failed post-decrement Long: ${aLong[0]} != $bLong" + + aFloat[0]++ + bFloat++ + if (aFloat[0] != bFloat) return "Failed post-increment Float: ${aFloat[0]} != $bFloat" + + aFloat[0]-- + bFloat-- + if (aFloat[0] != bFloat) return "Failed post-decrement Float: ${aFloat[0]} != $bFloat" + + aDouble[0]++ + bDouble++ + if (aDouble[0] != bDouble) return "Failed post-increment Double: ${aDouble[0]} != $bDouble" + + aDouble[0]-- + bDouble-- + if (aDouble[0] != bDouble) return "Failed post-decrement Double: ${aDouble[0]} != $bDouble" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/memberExtOnLong.kt b/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/memberExtOnLong.kt new file mode 100644 index 00000000000..6383a1c691b --- /dev/null +++ b/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/memberExtOnLong.kt @@ -0,0 +1,12 @@ +object ExtProvider { + operator fun Long.get(i: Int) = this + operator fun Long.set(i: Int, newValue: Long) {} +} + +fun box(): String { + with (ExtProvider) { + var x = 0L + val y = x[0]++ + return if (y == 0L) "OK" else "Failed, y=$y" + } +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/mutableListElement.kt b/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/mutableListElement.kt new file mode 100644 index 00000000000..2dc6f6d16d1 --- /dev/null +++ b/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/mutableListElement.kt @@ -0,0 +1,81 @@ +fun box(): String { + val aByte = arrayListOf(1) + var bByte: Byte = 1 + + val aShort = arrayListOf(1) + var bShort: Short = 1 + + val aInt = arrayListOf(1) + var bInt: Int = 1 + + val aLong = arrayListOf(1) + var bLong: Long = 1 + + val aFloat = arrayListOf(1.0f) + var bFloat: Float = 1.0f + + val aDouble = arrayListOf(1.0) + var bDouble: Double = 1.0 + + aByte[0]-- + bByte-- + + if (aByte[0] != bByte) return "Failed post-decrement Byte: ${aByte[0]} != $bByte" + + aByte[0]++ + bByte++ + + if (aByte[0] != bByte) return "Failed post-increment Byte: ${aByte[0]} != $bByte" + + aShort[0]-- + bShort-- + + if (aShort[0] != bShort) return "Failed post-decrement Short: ${aShort[0]} != $bShort" + + aShort[0]++ + bShort++ + + if (aShort[0] != bShort) return "Failed post-increment Short: ${aShort[0]} != $bShort" + + aInt[0]-- + bInt-- + + if (aInt[0] != bInt) return "Failed post-decrement Int: ${aInt[0]} != $bInt" + + aInt[0]++ + bInt++ + + if (aInt[0] != bInt) return "Failed post-increment Int: ${aInt[0]} != $bInt" + + aLong[0]-- + bLong-- + + if (aLong[0] != bLong) return "Failed post-decrement Long: ${aLong[0]} != $bLong" + + aLong[0]++ + bLong++ + + if (aLong[0] != bLong) return "Failed post-increment Long: ${aLong[0]} != $bLong" + + aFloat[0]-- + bFloat-- + + if (aFloat[0] != bFloat) return "Failed post-decrement Float: ${aFloat[0]} != $bFloat" + + aFloat[0]++ + bFloat++ + + if (aFloat[0] != bFloat) return "Failed post-increment Float: ${aFloat[0]} != $bFloat" + + aDouble[0]-- + bDouble-- + + if (aDouble[0] != bDouble) return "Failed post-decrement Double: ${aDouble[0]} != $bDouble" + + aDouble[0]++ + bDouble++ + + if (aDouble[0] != bDouble) return "Failed post-increment Double: ${aDouble[0]} != $bDouble" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/nullable.kt b/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/nullable.kt new file mode 100644 index 00000000000..4802b8a7fbc --- /dev/null +++ b/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/nullable.kt @@ -0,0 +1,69 @@ +fun box(): String { + var aByte: Byte? = 0 + var bByte: Byte = 0 + + var aShort: Short? = 0 + var bShort: Short = 0 + + var aInt: Int? = 0 + var bInt: Int = 0 + + var aLong: Long? = 0 + var bLong: Long = 0 + + var aFloat: Float? = 0.0f + var bFloat: Float = 0.0f + + var aDouble: Double? = 0.0 + var bDouble: Double = 0.0 + + if (aByte != null) aByte-- + bByte-- + if (aByte != bByte) return "Failed post-decrement Byte: $aByte != $bByte" + + if (aByte != null) aByte++ + bByte++ + if (aByte != bByte) return "Failed post-increment Byte: $aByte != $bByte" + + if (aShort != null) aShort-- + bShort-- + if (aShort != bShort) return "Failed post-decrement Short: $aShort != $bShort" + + if (aShort != null) aShort++ + bShort++ + if (aShort != bShort) return "Failed post-increment Short: $aShort != $bShort" + + if (aInt != null) aInt-- + bInt-- + if (aInt != bInt) return "Failed post-decrement Int: $aInt != $bInt" + + if (aInt != null) aInt++ + bInt++ + if (aInt != bInt) return "Failed post-increment Int: $aInt != $bInt" + + if (aLong != null) aLong-- + bLong-- + if (aLong != bLong) return "Failed post-decrement Long: $aLong != $bLong" + + if (aLong != null) aLong++ + bLong++ + if (aLong != bLong) return "Failed post-increment Long: $aLong != $bLong" + + if (aFloat != null) aFloat-- + bFloat-- + if (aFloat != bFloat) return "Failed post-decrement Float: $aFloat != $bFloat" + + if (aFloat != null) aFloat++ + bFloat++ + if (aFloat != bFloat) return "Failed post-increment Float: $aFloat != $bFloat" + + if (aDouble != null) aDouble-- + bDouble-- + if (aDouble != bDouble) return "Failed post-decrement Double: $aDouble != $bDouble" + + if (aDouble != null) aDouble++ + bDouble++ + if (aDouble != bDouble) return "Failed post-increment Double: $aDouble != $bDouble" + + return "OK" +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 59c18f6dd72..076092aadcc 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -5944,6 +5944,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { doTest(fileName); } + @TestMetadata("nestedMaps.kt") + public void testNestedMaps() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/nestedMaps.kt"); + doTest(fileName); + } + @TestMetadata("overloadedSet.kt") public void testOverloadedSet() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/overloadedSet.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxWithStdlibCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxWithStdlibCodegenTestGenerated.java index 07baff2bec5..7c44160faf7 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxWithStdlibCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxWithStdlibCodegenTestGenerated.java @@ -2732,6 +2732,63 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode } } + @TestMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PostfixIncrementDecrement extends AbstractBlackBoxCodegenTest { + public void testAllFilesPresentInPostfixIncrementDecrement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement"), Pattern.compile("^(.+)\\.kt$"), true); + } + + @TestMetadata("arrayElement.kt") + public void testArrayElement() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/arrayElement.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("classNaryGetSet.kt") + public void testClassNaryGetSet() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/classNaryGetSet.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("classWithGetSet.kt") + public void testClassWithGetSet() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/classWithGetSet.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("extOnLong.kt") + public void testExtOnLong() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/extOnLong.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("genericClassWithGetSet.kt") + public void testGenericClassWithGetSet() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/genericClassWithGetSet.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("memberExtOnLong.kt") + public void testMemberExtOnLong() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/memberExtOnLong.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("mutableListElement.kt") + public void testMutableListElement() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/mutableListElement.kt"); + doTestWithStdlib(fileName); + } + + @TestMetadata("nullable.kt") + public void testNullable() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/nullable.kt"); + doTestWithStdlib(fileName); + } + } + @TestMetadata("compiler/testData/codegen/boxWithStdlib/privateConstructor") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)