Support generic underlying type of inline class
Use upper bound in JVM representation. #KT-32162
This commit is contained in:
+22
@@ -16835,6 +16835,28 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class GenericUnderlyingValue {
|
||||
@Test
|
||||
public void testAllFilesPresentInGenericUnderlyingValue() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("upperBound.kt")
|
||||
public void testUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/upperBound.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/hiddenConstructor")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+22
@@ -16799,6 +16799,28 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class GenericUnderlyingValue {
|
||||
@Test
|
||||
public void testAllFilesPresentInGenericUnderlyingValue() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("upperBound.kt")
|
||||
public void testUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/upperBound.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/hiddenConstructor")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+23
@@ -14227,6 +14227,29 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class GenericUnderlyingValue extends AbstractIrCodegenBoxWasmTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInGenericUnderlyingValue() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("upperBound.kt")
|
||||
public void testUpperBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/upperBound.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/hiddenConstructor")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user