Add tests for constructors taking inline class arguments
This commit is contained in:
committed by
Alexander Udalov
parent
9389d88232
commit
21af7dfbe1
@@ -0,0 +1,10 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// FILE: test.kt
|
||||
inline class A(val x: String)
|
||||
class B(val y: A)
|
||||
|
||||
fun box() =
|
||||
B(A("OK")).y.x
|
||||
|
||||
// @TestKt.class:
|
||||
// 1 INVOKESPECIAL B.<init> \(Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;\)V
|
||||
@@ -0,0 +1,11 @@
|
||||
inline class A(val x: Int)
|
||||
|
||||
class B(val y: A)
|
||||
|
||||
// TESTED_OBJECT_KIND: function
|
||||
// TESTED_OBJECTS: A, <init>
|
||||
// FLAGS: ACC_PRIVATE, ACC_SYNTHETIC
|
||||
|
||||
// TESTED_OBJECT_KIND: function
|
||||
// TESTED_OBJECTS: B, <init>
|
||||
// FLAGS: ACC_PRIVATE
|
||||
@@ -2478,6 +2478,11 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
||||
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/checkOuterInlineFunctionCall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constructorBridge.kt")
|
||||
public void testConstructorBridge() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/constructorBridge.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultParametersDontBox.kt")
|
||||
public void testDefaultParametersDontBox() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/defaultParametersDontBox.kt");
|
||||
|
||||
+5
@@ -481,6 +481,11 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
|
||||
public void testTopLevelObject() throws Exception {
|
||||
runTest("compiler/testData/writeFlags/function/constructors/topLevelObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("withMangledArguments.kt")
|
||||
public void testWithMangledArguments() throws Exception {
|
||||
runTest("compiler/testData/writeFlags/function/constructors/withMangledArguments.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/writeFlags/function/deprecatedFlag")
|
||||
|
||||
+5
@@ -2448,6 +2448,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
|
||||
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/checkOuterInlineFunctionCall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constructorBridge.kt")
|
||||
public void testConstructorBridge() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/constructorBridge.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultParametersDontBox.kt")
|
||||
public void testDefaultParametersDontBox() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/inlineClasses/defaultParametersDontBox.kt");
|
||||
|
||||
+5
@@ -481,6 +481,11 @@ public class IrWriteFlagsTestGenerated extends AbstractIrWriteFlagsTest {
|
||||
public void testTopLevelObject() throws Exception {
|
||||
runTest("compiler/testData/writeFlags/function/constructors/topLevelObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("withMangledArguments.kt")
|
||||
public void testWithMangledArguments() throws Exception {
|
||||
runTest("compiler/testData/writeFlags/function/constructors/withMangledArguments.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/writeFlags/function/deprecatedFlag")
|
||||
|
||||
Reference in New Issue
Block a user