Handle non-reified type parameters of function inside serializer<T>() intrinsic

to match an error message thrown from KType-based serializer<T>().

Fixes https://github.com/Kotlin/kotlinx.serialization/issues/2528
This commit is contained in:
Leonid Startsev
2023-12-18 19:04:30 +01:00
committed by Space Team
parent a2cd2200d6
commit 6c6f2ccacd
11 changed files with 429 additions and 18 deletions
@@ -43,6 +43,12 @@ public class SerializationAsmLikeInstructionsListingTestGenerated extends Abstra
runTest("plugins/kotlinx-serialization/testData/codegen/IntrinsicsAdvanced.kt");
}
@Test
@TestMetadata("IntrinsicsNonReified.kt")
public void testIntrinsicsNonReified() throws Exception {
runTest("plugins/kotlinx-serialization/testData/codegen/IntrinsicsNonReified.kt");
}
@Test
@TestMetadata("Sealed.kt")
public void testSealed() throws Exception {
@@ -43,6 +43,12 @@ public class SerializationFirLightTreeAsmLikeInstructionsListingTestGenerated ex
runTest("plugins/kotlinx-serialization/testData/codegen/IntrinsicsAdvanced.kt");
}
@Test
@TestMetadata("IntrinsicsNonReified.kt")
public void testIntrinsicsNonReified() throws Exception {
runTest("plugins/kotlinx-serialization/testData/codegen/IntrinsicsNonReified.kt");
}
@Test
@TestMetadata("Sealed.kt")
public void testSealed() throws Exception {
@@ -165,6 +165,12 @@ public class SerializationFirLightTreeBlackBoxTestGenerated extends AbstractSeri
runTest("plugins/kotlinx-serialization/testData/boxIr/intrinsicsBox.kt");
}
@Test
@TestMetadata("intrinsicsNonReified.kt")
public void testIntrinsicsNonReified() throws Exception {
runTest("plugins/kotlinx-serialization/testData/boxIr/intrinsicsNonReified.kt");
}
@Test
@TestMetadata("intrinsicsNullable.kt")
public void testIntrinsicsNullable() throws Exception {
@@ -43,6 +43,12 @@ public class SerializationIrAsmLikeInstructionsListingTestGenerated extends Abst
runTest("plugins/kotlinx-serialization/testData/codegen/IntrinsicsAdvanced.kt");
}
@Test
@TestMetadata("IntrinsicsNonReified.kt")
public void testIntrinsicsNonReified() throws Exception {
runTest("plugins/kotlinx-serialization/testData/codegen/IntrinsicsNonReified.kt");
}
@Test
@TestMetadata("Sealed.kt")
public void testSealed() throws Exception {
@@ -163,6 +163,12 @@ public class SerializationIrBoxTestGenerated extends AbstractSerializationIrBoxT
runTest("plugins/kotlinx-serialization/testData/boxIr/intrinsicsBox.kt");
}
@Test
@TestMetadata("intrinsicsNonReified.kt")
public void testIntrinsicsNonReified() throws Exception {
runTest("plugins/kotlinx-serialization/testData/boxIr/intrinsicsNonReified.kt");
}
@Test
@TestMetadata("intrinsicsNullable.kt")
public void testIntrinsicsNullable() throws Exception {