Test for KT-7222 Redundant boxing on toString call
#KT-7222 Fixed
This commit is contained in:
@@ -0,0 +1,14 @@
|
|||||||
|
fun main() {
|
||||||
|
false.toString()
|
||||||
|
1.toByte().toString()
|
||||||
|
1.toShort().toString()
|
||||||
|
1.toString()
|
||||||
|
1L.toString()
|
||||||
|
1.0F.toString()
|
||||||
|
1.0.toString()
|
||||||
|
'c'.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Check that all "valueOf" are String ones and there is no boxing*/
|
||||||
|
// 8 valueOf
|
||||||
|
// 8 INVOKESTATIC java/lang/String.valueOf
|
||||||
@@ -687,6 +687,12 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
|||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringOperations/plusAssign.kt");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringOperations/plusAssign.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("primitiveToString.kt")
|
||||||
|
public void testPrimitiveToString() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringOperations/primitiveToString.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/bytecodeText/when")
|
@TestMetadata("compiler/testData/codegen/bytecodeText/when")
|
||||||
|
|||||||
Reference in New Issue
Block a user