Use a correct type for SERIALIZER_TYPE_INCOMPATIBLE diagnostic.

This diagnostic used an incorrect type for rendering (outer class type instead of a property type)
and didn't expand type argument of `KSerializer`.

Also add an additional test case for generic parameters.

#KT-63570 Fixed
This commit is contained in:
Leonid Startsev
2023-11-24 16:16:51 +01:00
committed by Space Team
parent 1260d03561
commit 51e3e9af94
7 changed files with 112 additions and 2 deletions
@@ -164,6 +164,12 @@ public class SerializationFirPsiDiagnosticTestGenerated extends AbstractSerializ
runTest("plugins/kotlinx-serialization/testData/diagnostics/SerializerTypeIncompatible.kt");
}
@Test
@TestMetadata("SerializerTypeIncompatibleViaTypealias.kt")
public void testSerializerTypeIncompatibleViaTypealias() throws Exception {
runTest("plugins/kotlinx-serialization/testData/diagnostics/SerializerTypeIncompatibleViaTypealias.kt");
}
@Test
@TestMetadata("Transients.kt")
public void testTransients() throws Exception {
@@ -162,6 +162,12 @@ public class SerializationPluginDiagnosticTestGenerated extends AbstractSerializ
runTest("plugins/kotlinx-serialization/testData/diagnostics/SerializerTypeIncompatible.kt");
}
@Test
@TestMetadata("SerializerTypeIncompatibleViaTypealias.kt")
public void testSerializerTypeIncompatibleViaTypealias() throws Exception {
runTest("plugins/kotlinx-serialization/testData/diagnostics/SerializerTypeIncompatibleViaTypealias.kt");
}
@Test
@TestMetadata("Transients.kt")
public void testTransients() throws Exception {