@@ -39,14 +39,9 @@ class SerializersModuleTest {
39
39
40
40
class ContextualType (val i : Int )
41
41
42
- class ParametrizedContextual <T : Any >(val a : T )
43
-
44
42
@Serializer(forClass = ContextualType ::class )
45
43
object ContextualSerializer
46
44
47
- @Serializer(forClass = ParametrizedContextual ::class )
48
- object ParametrizedContextualSerializer
49
-
50
45
@Serializable
51
46
class ContextualHolder (@Contextual val contextual : ContextualType )
52
47
@@ -98,7 +93,6 @@ class SerializersModuleTest {
98
93
fun testContextual () {
99
94
val m = SerializersModule {
100
95
contextual<ContextualType >(ContextualSerializer )
101
- contextual<ParametrizedContextual <* >>(ParametrizedContextualSerializer as KSerializer <ParametrizedContextual <* >>)
102
96
contextual(ContextualGenericsTest .ThirdPartyBox ::class ) { args -> ContextualGenericsTest .ThirdPartyBoxSerializer (args[0 ]) }
103
97
}
104
98
@@ -109,9 +103,6 @@ class SerializersModuleTest {
109
103
assertIs<ContextualGenericsTest .ThirdPartyBoxSerializer <Int >>(boxSerializer)
110
104
assertEquals(PrimitiveKind .INT , boxSerializer.descriptor.getElementDescriptor(0 ).kind)
111
105
112
- val parametrizedSerializer = m.serializer(ParametrizedContextual ::class , listOf (Int .serializer()), false )
113
- assertSame<KSerializer <* >>(ParametrizedContextualSerializer , parametrizedSerializer)
114
-
115
106
val holderSerializer = m.serializer(ContextualHolder ::class , emptyList(), false )
116
107
assertSame<KSerializer <* >>(ContextualHolder .serializer(), holderSerializer)
117
108
}
0 commit comments