// FIR_IDENTICAL import kotlinx.serialization.* import kotlinx.serialization.descriptors.* import kotlinx.serialization.encoding.* class Prop1(val t: T) class Prop2(val t: T, val r: R) @Serializer(forClass = Prop1::class) class ExternalSerializer0_1 @Serializer(forClass = Prop1::class) class ExternalSerializer1_1(val typeSerial0: KSerializer) @Serializer(forClass = Prop1::class) class ExternalSerializer1_1Secondary() { var typeSerial0: KSerializer? = null constructor(typeSerial0: KSerializer) : this() { this.typeSerial0 = typeSerial0 } } @Serializer(forClass = Prop2::class) class ExternalSerializer0_2 @Serializer(forClass = Prop2::class) class ExternalSerializer1_2(val typeSerial0: KSerializer) @Serializer(forClass = Prop2::class) class ExternalSerializer1_2Secondary() { var typeSerial0: KSerializer? = null constructor(typeSerial0: KSerializer) : this() { this.typeSerial0 = typeSerial0 } } @Serializer(forClass = Prop2::class) class ExternalSerializer2_2Secondary() { var typeSerial0: KSerializer? = null var typeSerial1: KSerializer? = null constructor(typeSerial0: KSerializer) : this() { this.typeSerial0 = typeSerial0 } constructor(typeSerial0: KSerializer, typeSerial1: KSerializer) : this() { this.typeSerial0 = typeSerial0 this.typeSerial1 = typeSerial1 } } @Serializer(forClass = Prop1Err::class) class ExternalSerializer0_1Err // there is no error in the discrepancy between the number of constructor parameters in the serializer // because the checks take place at the place where the serializer is declared, and if the serializer is declared correctly, there will be no error here @Serializable(ExternalSerializer0_1Err::class) class Prop1Err(val t: T)