Add test for KT-27140
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// WITH_RUNTIME
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Z(private val i: Int) {
|
||||
fun toByteArray() = ByteArray(1) { i.toByte() }
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val z = Z(42)
|
||||
if (z.toByteArray()[0].toInt() != 42) throw AssertionError()
|
||||
return "OK"
|
||||
}
|
||||
+5
@@ -11819,6 +11819,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/kt26103_original.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt27140.kt")
|
||||
public void testKt27140() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/kt27140.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noAssertionsOnInlineClassBasedOnNullableType.kt")
|
||||
public void testNoAssertionsOnInlineClassBasedOnNullableType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/noAssertionsOnInlineClassBasedOnNullableType.kt");
|
||||
|
||||
+5
@@ -11819,6 +11819,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/kt26103_original.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt27140.kt")
|
||||
public void testKt27140() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/kt27140.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noAssertionsOnInlineClassBasedOnNullableType.kt")
|
||||
public void testNoAssertionsOnInlineClassBasedOnNullableType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/noAssertionsOnInlineClassBasedOnNullableType.kt");
|
||||
|
||||
+5
@@ -11824,6 +11824,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/kt26103_original.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt27140.kt")
|
||||
public void testKt27140() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/kt27140.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noAssertionsOnInlineClassBasedOnNullableType.kt")
|
||||
public void testNoAssertionsOnInlineClassBasedOnNullableType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/noAssertionsOnInlineClassBasedOnNullableType.kt");
|
||||
|
||||
+5
@@ -10359,6 +10359,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/kt26103_original.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt27140.kt")
|
||||
public void testKt27140() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/kt27140.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noAssertionsOnInlineClassBasedOnNullableType.kt")
|
||||
public void testNoAssertionsOnInlineClassBasedOnNullableType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/noAssertionsOnInlineClassBasedOnNullableType.kt");
|
||||
|
||||
+5
@@ -11404,6 +11404,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/kt26103_original.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt27140.kt")
|
||||
public void testKt27140() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/kt27140.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noAssertionsOnInlineClassBasedOnNullableType.kt")
|
||||
public void testNoAssertionsOnInlineClassBasedOnNullableType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/noAssertionsOnInlineClassBasedOnNullableType.kt");
|
||||
|
||||
Reference in New Issue
Block a user