Minor. Add regression test for KT-41997

#KT-41997 Fixed
This commit is contained in:
Ilmir Usmanov
2023-09-12 20:11:55 +02:00
committed by Space Team
parent 94eefba824
commit f7a2da8f82
19 changed files with 185 additions and 0 deletions
@@ -34044,6 +34044,18 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@Test
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@Test
@TestMetadata("expectValInInlineClassJVM.kt")
public void testExpectValInInlineClassJVM() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClassJVM.kt");
}
@Test
@TestMetadata("javaMethodWithTypeParameter.kt")
public void testJavaMethodWithTypeParameter() throws Exception {
@@ -34044,6 +34044,18 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@Test
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@Test
@TestMetadata("expectValInInlineClassJVM.kt")
public void testExpectValInInlineClassJVM() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClassJVM.kt");
}
@Test
@TestMetadata("javaMethodWithTypeParameter.kt")
public void testJavaMethodWithTypeParameter() throws Exception {
@@ -34044,6 +34044,18 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@Test
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@Test
@TestMetadata("expectValInInlineClassJVM.kt")
public void testExpectValInInlineClassJVM() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClassJVM.kt");
}
@Test
@TestMetadata("javaMethodWithTypeParameter.kt")
public void testJavaMethodWithTypeParameter() throws Exception {
@@ -0,0 +1,21 @@
// LANGUAGE: +MultiPlatformProjects
// IGNORE_BACKEND_K1: ANY
// IGNORE_LIGHT_TREE
// IGNORE_LIGHT_ANALYSIS
// IGNORE_BACKEND_K2: JVM_IR
// MODULE: common
// FILE: common.kt
expect value class Wrapper(val obj: Any) {
val prop: String // [PROPERTY_WITH_BACKING_FIELD_INSIDE_VALUE_CLASS] Value class cannot have properties with backing fields
}
// MODULE: main()()(common)
// FILE: test.kt
actual value class Wrapper(val obj: Any) {
val prop: String
get() = "OK"
}
fun box(): String = Wrapper("").prop
@@ -0,0 +1,22 @@
// LANGUAGE: +MultiPlatformProjects
// IGNORE_BACKEND_K1: ANY
// IGNORE_LIGHT_TREE
// TARGET_BACKEND: JVM
// WITH_STDLIB
// MODULE: common
// FILE: common.kt
expect value class Wrapper(val obj: Any) {
val prop: String // [PROPERTY_WITH_BACKING_FIELD_INSIDE_VALUE_CLASS] Value class cannot have properties with backing fields
}
// MODULE: main()()(common)
// FILE: test.kt
@JvmInline
actual value class Wrapper(val obj: Any) {
val prop: String
get() = "OK"
}
fun box(): String = Wrapper("").prop
@@ -32352,6 +32352,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@Test
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@Test
@TestMetadata("expectValInInlineClassJVM.kt")
public void testExpectValInInlineClassJVM() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClassJVM.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations")
@TestDataPath("$PROJECT_ROOT")
@@ -34044,6 +34044,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@Test
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@Test
@TestMetadata("expectValInInlineClassJVM.kt")
public void testExpectValInInlineClassJVM() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClassJVM.kt");
}
@Test
@TestMetadata("javaMethodWithTypeParameter.kt")
public void testJavaMethodWithTypeParameter() throws Exception {
@@ -34044,6 +34044,18 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@Test
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@Test
@TestMetadata("expectValInInlineClassJVM.kt")
public void testExpectValInInlineClassJVM() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClassJVM.kt");
}
@Test
@TestMetadata("javaMethodWithTypeParameter.kt")
public void testJavaMethodWithTypeParameter() throws Exception {
@@ -29011,6 +29011,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@TestMetadata("expectValInInlineClassJVM.kt")
public void testExpectValInInlineClassJVM() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClassJVM.kt");
}
@TestMetadata("javaMethodWithTypeParameter.kt")
public void testJavaMethodWithTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/javaMethodWithTypeParameter.kt");
@@ -23808,6 +23808,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@Test
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations")
@TestDataPath("$PROJECT_ROOT")
@@ -23808,6 +23808,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@Test
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations")
@TestDataPath("$PROJECT_ROOT")
@@ -23808,6 +23808,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@Test
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations")
@TestDataPath("$PROJECT_ROOT")
@@ -23808,6 +23808,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@Test
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations")
@TestDataPath("$PROJECT_ROOT")
@@ -26777,6 +26777,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@Test
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations")
@TestDataPath("$PROJECT_ROOT")
@@ -27393,6 +27393,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@Test
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations")
@TestDataPath("$PROJECT_ROOT")
@@ -26470,6 +26470,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@Test
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations")
@TestDataPath("$PROJECT_ROOT")
@@ -26778,6 +26778,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@Test
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations")
@TestDataPath("$PROJECT_ROOT")
@@ -23556,6 +23556,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@Test
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations")
@TestDataPath("$PROJECT_ROOT")
@@ -23556,6 +23556,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
runTest("compiler/testData/codegen/box/multiplatform/k2/dataClassInCommonAndPlatform.kt");
}
@Test
@TestMetadata("expectValInInlineClass.kt")
public void testExpectValInInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/expectValInInlineClass.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/annotations")
@TestDataPath("$PROJECT_ROOT")