FIR deserializer: apply attributes on type parameter-based types

#KT-62578 Fixed
This commit is contained in:
Mikhail Glukhikh
2023-10-16 13:33:35 +02:00
committed by Space Team
parent 1d95927582
commit 4ed7504d87
20 changed files with 108 additions and 34 deletions
@@ -204,7 +204,7 @@ internal class StubBasedFirTypeDeserializer(
val constructor = typeSymbol(typeReference) ?: return null
val isNullable = typeReference.typeElement is KtNullableType
if (constructor is ConeTypeParameterLookupTag) {
return ConeTypeParameterTypeImpl(constructor, isNullable = isNullable).let {
return ConeTypeParameterTypeImpl(constructor, isNullable = isNullable, attributes).let {
if (typeReference.typeElement?.unwrapNullability() is KtIntersectionType) {
ConeDefinitelyNotNullType.create(it, moduleData.session.typeContext, avoidComprehensiveCheck = true) ?: it
} else it
@@ -19,7 +19,7 @@ FILE: delegateTypeMismatch.kt
public get(): R|kotlin/Boolean|
private final fun <T> property(initialValue: R|T|): R|kotlin/properties/ReadWriteProperty<A, T>| {
^property Q|kotlin/properties/Delegates|.R|kotlin/properties/Delegates.vetoable|<R|T|>(R|<local>/initialValue|, <L> = vetoable@fun <anonymous>(<unused var>: R|@R|kotlin/ParameterName|(name = String(property)) kotlin/reflect/KProperty<*>|, <unused var>: R|T|, <unused var>: R|T|): R|kotlin/Boolean| <inline=CrossInline> {
^property Q|kotlin/properties/Delegates|.R|kotlin/properties/Delegates.vetoable|<R|T|>(R|<local>/initialValue|, <L> = vetoable@fun <anonymous>(<unused var>: R|@R|kotlin/ParameterName|(name = String(property)) kotlin/reflect/KProperty<*>|, <unused var>: R|@R|kotlin/ParameterName|(name = String(oldValue)) T|, <unused var>: R|@R|kotlin/ParameterName|(name = String(newValue)) T|): R|kotlin/Boolean| <inline=CrossInline> {
^ when () {
this@R|/A|.R|/A.isLocked| -> {
throw R|java/lang/IllegalStateException.IllegalStateException|(String(Cannot modify readonly DescriptorRendererOptions))
@@ -1,6 +1,6 @@
FILE: test.kt
public final fun foo(tag: R|XmlTag|, name: R|kotlin/String|): R|kotlin/collections/List<XmlTag>| {
lval result: R|kotlin/collections/List<XmlTag>| = R|<local>/tag|.R|/PsiElement.children|.R|kotlin/collections/filterIsInstance|<R|XmlTag|>().R|kotlin/collections/filter|<R|XmlTag|>(<L> = filter@fun <anonymous>(it: R|XmlTag|): R|kotlin/Boolean| <inline=Inline, kind=UNKNOWN> {
lval result: R|kotlin/collections/List<@NoInfer XmlTag>| = R|<local>/tag|.R|/PsiElement.children|.R|kotlin/collections/filterIsInstance|<R|XmlTag|>().R|kotlin/collections/filter|<R|@NoInfer XmlTag|>(<L> = filter@fun <anonymous>(it: R|@NoInfer XmlTag|): R|kotlin/Boolean| <inline=Inline, kind=UNKNOWN> {
^ ==(R|<local>/it|.R|/XmlTag.localName|, R|<local>/name|)
}
)
@@ -19,13 +19,13 @@ FILE: withInInitializer.kt
public final val data: R|First| = R|/First.First|(Int(42))
public get(): R|First|
public final val test: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/with|<R|First|, R|kotlin/collections/List<kotlin/Int>|>(this@R|/Second|.R|/Second.data|, <L> = with@fun R|First|.<anonymous>(): R|kotlin/collections/List<kotlin/Int>| <inline=Inline, kind=EXACTLY_ONCE> {
^ this@R|/Second|.R|/Second.list|.R|kotlin/collections/filterIsInstance|<R|kotlin/Int|>().R|kotlin/collections/filter|<R|kotlin/Int|>(<L> = filter@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <inline=Inline, kind=UNKNOWN> {
public final val test: R|kotlin/collections/List<@NoInfer kotlin/Int>| = R|kotlin/with|<R|First|, R|kotlin/collections/List<@NoInfer kotlin/Int>|>(this@R|/Second|.R|/Second.data|, <L> = with@fun R|First|.<anonymous>(): R|kotlin/collections/List<@NoInfer kotlin/Int>| <inline=Inline, kind=EXACTLY_ONCE> {
^ this@R|/Second|.R|/Second.list|.R|kotlin/collections/filterIsInstance|<R|kotlin/Int|>().R|kotlin/collections/filter|<R|@NoInfer kotlin/Int|>(<L> = filter@fun <anonymous>(it: R|@NoInfer kotlin/Int|): R|kotlin/Boolean| <inline=Inline, kind=UNKNOWN> {
^ ==(R|<local>/it|, this@R|special/anonymous|.R|/First.member|)
}
)
}
)
public get(): R|kotlin/collections/List<kotlin/Int>|
public get(): R|kotlin/collections/List<@NoInfer kotlin/Int>|
}
@@ -164,7 +164,7 @@ class FirTypeDeserializer(
private fun simpleType(proto: ProtoBuf.Type, attributes: ConeAttributes): ConeSimpleKotlinType? {
val constructor = typeSymbol(proto) ?: return null
if (constructor is ConeTypeParameterLookupTag) {
return ConeTypeParameterTypeImpl(constructor, isNullable = proto.nullable).let {
return ConeTypeParameterTypeImpl(constructor, isNullable = proto.nullable, attributes).let {
if (Flags.DEFINITELY_NOT_NULL_TYPE.get(proto.flags))
ConeDefinitelyNotNullType.create(it, moduleData.session.typeContext, avoidComprehensiveCheck = true) ?: it
else
@@ -19161,6 +19161,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/fir/nestedClassTypeParameterDeserialization.kt");
}
@Test
@TestMetadata("noInfer.kt")
public void testNoInfer() throws Exception {
runTest("compiler/testData/codegen/box/fir/noInfer.kt");
}
@Test
@TestMetadata("noSymbolForIntRangeIterator.kt")
public void testNoSymbolForIntRangeIterator() throws Exception {
@@ -19161,6 +19161,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated
runTest("compiler/testData/codegen/box/fir/nestedClassTypeParameterDeserialization.kt");
}
@Test
@TestMetadata("noInfer.kt")
public void testNoInfer() throws Exception {
runTest("compiler/testData/codegen/box/fir/noInfer.kt");
}
@Test
@TestMetadata("noSymbolForIntRangeIterator.kt")
public void testNoSymbolForIntRangeIterator() throws Exception {
@@ -19161,6 +19161,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/fir/nestedClassTypeParameterDeserialization.kt");
}
@Test
@TestMetadata("noInfer.kt")
public void testNoInfer() throws Exception {
runTest("compiler/testData/codegen/box/fir/noInfer.kt");
}
@Test
@TestMetadata("noSymbolForIntRangeIterator.kt")
public void testNoSymbolForIntRangeIterator() throws Exception {
+39
View File
@@ -0,0 +1,39 @@
// WITH_STDLIB
// TARGET_BACKEND: JVM_IR
// ISSUE: KT-62578
// MODULE: lib
// FILE: lib.kt
interface Base
class Derived : Base
data class Box<out T>(val className: String)
val emptyBox: Box<Nothing>
get() = Box<Nothing>("Nothing")
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
inline fun <reified T> foo(x: @kotlin.internal.NoInfer T): Box<T>? {
val klass = T::class
return Box(klass.simpleName ?: "<unknown>")
}
fun test_1(): Box<Base> {
return foo(Derived()) ?: emptyBox
}
// MODULE: main(lib)
// FILE: main.kt
fun test_2(): Box<Base> {
return foo(Derived()) ?: emptyBox
}
fun box(): String {
val expectedName = "Base"
val box1 = test_1()
if (box1.className != expectedName) return "Fail 1: $box1"
val box2 = test_2()
if (box2.className != expectedName) return "Fail 2: $box2"
return "OK"
}
@@ -1,6 +1,6 @@
FILE: setOperatorOnDynamic.fir.kt
public final fun foo(): R|kotlin/Unit| {
lval x1: R|kotlin/Any| = R|kotlin/arrayOf|<R|kotlin/String|>().R|kotlin/collections/fold|<R|kotlin/String|, R|kotlin/String|>(String(), <L> = fold@fun <anonymous>(res: R|kotlin/String|, key: R|kotlin/String|): R|kotlin/String| <inline=Inline, kind=UNKNOWN> {
lval x1: R|kotlin/Any| = R|kotlin/arrayOf|<R|kotlin/String|>().R|kotlin/collections/fold|<R|kotlin/String|, R|kotlin/String|>(String(), <L> = fold@fun <anonymous>(res: R|@R|kotlin/ParameterName|(name = String(acc)) kotlin/String|, key: R|kotlin/String|): R|kotlin/String| <inline=Inline, kind=UNKNOWN> {
R|<local>/res|.R|kotlin/String.length|
^ R|<local>/res|
}
@@ -142,21 +142,21 @@ FILE fqName:<root> fileName:/monoidSum.kt
VALUE_PARAMETER name:$context_receiver_0 index:0 type:<root>.Monoid<T of <root>.sum>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun sum <T> ($context_receiver_0: <root>.Monoid<T of <root>.sum>): T of <root>.sum declared in <root>'
CALL 'public final fun fold <T, R> (initial: R of kotlin.collections.fold, operation: kotlin.Function2<R of kotlin.collections.fold, T of kotlin.collections.fold, R of kotlin.collections.fold>): R of kotlin.collections.fold declared in kotlin.collections' type=T of <root>.sum origin=null
CALL 'public final fun fold <T, R> (initial: R of kotlin.collections.fold, operation: kotlin.Function2<@[ParameterName(name = 'acc')] R of kotlin.collections.fold, T of kotlin.collections.fold, R of kotlin.collections.fold>): R of kotlin.collections.fold declared in kotlin.collections' type=T of <root>.sum origin=null
<T>: T of <root>.sum
<R>: T of <root>.sum
$receiver: GET_VAR '<this>: kotlin.collections.List<T of <root>.sum> declared in <root>.sum' type=kotlin.collections.List<T of <root>.sum> origin=null
initial: CALL 'public abstract fun <get-unit> (): T of <root>.Monoid declared in <root>.Monoid' type=T of <root>.sum origin=GET_PROPERTY
$this: GET_VAR '$context_receiver_0: <root>.Monoid<T of <root>.sum> declared in <root>.sum' type=<root>.Monoid<T of <root>.sum> origin=null
operation: FUN_EXPR type=kotlin.Function2<T of <root>.sum, T of <root>.sum, T of <root>.sum> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (acc:T of <root>.sum, e:T of <root>.sum) returnType:T of <root>.sum
VALUE_PARAMETER name:acc index:0 type:T of <root>.sum
operation: FUN_EXPR type=kotlin.Function2<@[ParameterName(name = 'acc')] T of <root>.sum, T of <root>.sum, T of <root>.sum> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (acc:@[ParameterName(name = 'acc')] T of <root>.sum, e:T of <root>.sum) returnType:T of <root>.sum
VALUE_PARAMETER name:acc index:0 type:@[ParameterName(name = 'acc')] T of <root>.sum
VALUE_PARAMETER name:e index:1 type:T of <root>.sum
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (acc: T of <root>.sum, e: T of <root>.sum): T of <root>.sum declared in <root>.sum'
RETURN type=kotlin.Nothing from='local final fun <anonymous> (acc: @[ParameterName(name = 'acc')] T of <root>.sum, e: T of <root>.sum): T of <root>.sum declared in <root>.sum'
CALL 'public abstract fun combine (other: T of <root>.Monoid): T of <root>.Monoid declared in <root>.Monoid' type=T of <root>.sum origin=null
$this: GET_VAR '$context_receiver_0: <root>.Monoid<T of <root>.sum> declared in <root>.sum' type=<root>.Monoid<T of <root>.sum> origin=null
$receiver: GET_VAR 'acc: T of <root>.sum declared in <root>.sum.<anonymous>' type=T of <root>.sum origin=null
$receiver: GET_VAR 'acc: @[ParameterName(name = 'acc')] T of <root>.sum declared in <root>.sum.<anonymous>' type=@[ParameterName(name = 'acc')] T of <root>.sum origin=null
other: GET_VAR 'e: T of <root>.sum declared in <root>.sum.<anonymous>' type=T of <root>.sum origin=null
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
@@ -44,7 +44,7 @@ object StringMonoid : Monoid<String> {
}
fun <T : Any?> List<T>.sum($context_receiver_0: Monoid<T>): T {
return <this>.fold<T, T>(initial = $context_receiver_0.<get-unit>(), operation = local fun <anonymous>(acc: T, e: T): T {
return <this>.fold<T, T>(initial = $context_receiver_0.<get-unit>(), operation = local fun <anonymous>(acc: @ParameterName(name = "acc") T, e: T): T {
return ($context_receiver_0, acc).combine(other = e)
}
)
@@ -25,21 +25,21 @@
@10:4..12:5 PROPERTY name:observableProp visibility:public modality:FINAL [delegated,var]
@10:4..12:5 FIELD PROPERTY_DELEGATE name:observableProp$delegate type:kotlin.properties.ReadWriteProperty<kotlin.Any?, kotlin.String> visibility:private [final]
@10:44..12:5 EXPRESSION_BODY
@10:44..12:5 CALL 'public final fun observable <T> (initialValue: T of kotlin.properties.Delegates.observable, onChange: kotlin.Function3<@[ParameterName(name = 'property')] kotlin.reflect.KProperty<*>, T of kotlin.properties.Delegates.observable, T of kotlin.properties.Delegates.observable, kotlin.Unit>): kotlin.properties.ReadWriteProperty<kotlin.Any?, T of kotlin.properties.Delegates.observable> [inline] declared in kotlin.properties.Delegates' type=kotlin.properties.ReadWriteProperty<kotlin.Any?, kotlin.String> origin=null
@10:44..12:5 CALL 'public final fun observable <T> (initialValue: T of kotlin.properties.Delegates.observable, onChange: kotlin.Function3<@[ParameterName(name = 'property')] kotlin.reflect.KProperty<*>, @[ParameterName(name = 'oldValue')] T of kotlin.properties.Delegates.observable, @[ParameterName(name = 'newValue')] T of kotlin.properties.Delegates.observable, kotlin.Unit>): kotlin.properties.ReadWriteProperty<kotlin.Any?, T of kotlin.properties.Delegates.observable> [inline] declared in kotlin.properties.Delegates' type=kotlin.properties.ReadWriteProperty<kotlin.Any?, kotlin.String> origin=null
@10:34..43 GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Delegates modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.properties.Delegates
@10:55..63 CONST String type=kotlin.String value="<none>"
@10:65..12:5 FUN_EXPR type=kotlin.Function3<@[ParameterName(name = 'property')] kotlin.reflect.KProperty<*>, kotlin.String, kotlin.String, kotlin.Unit> origin=LAMBDA
@10:65..12:5 FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (prop:@[ParameterName(name = 'property')] kotlin.reflect.KProperty<*>, old:kotlin.String, new:kotlin.String) returnType:kotlin.Unit
@10:65..12:5 FUN_EXPR type=kotlin.Function3<@[ParameterName(name = 'property')] kotlin.reflect.KProperty<*>, @[ParameterName(name = 'oldValue')] kotlin.String, @[ParameterName(name = 'newValue')] kotlin.String, kotlin.Unit> origin=LAMBDA
@10:65..12:5 FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (prop:@[ParameterName(name = 'property')] kotlin.reflect.KProperty<*>, old:@[ParameterName(name = 'oldValue')] kotlin.String, new:@[ParameterName(name = 'newValue')] kotlin.String) returnType:kotlin.Unit
@10:67..71 VALUE_PARAMETER name:prop index:0 type:@[ParameterName(name = 'property')] kotlin.reflect.KProperty<*>
@10:73..76 VALUE_PARAMETER name:old index:1 type:kotlin.String
@10:78..81 VALUE_PARAMETER name:new index:2 type:kotlin.String
@10:73..76 VALUE_PARAMETER name:old index:1 type:@[ParameterName(name = 'oldValue')] kotlin.String
@10:78..81 VALUE_PARAMETER name:new index:2 type:@[ParameterName(name = 'newValue')] kotlin.String
@11:8..37 BLOCK_BODY
@11:8..37 CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null
@11:16..36 STRING_CONCATENATION type=kotlin.String
@11:17..21 CONST String type=kotlin.String value="Was "
@11:22..25 GET_VAR 'old: kotlin.String declared in <root>.MyClass.observableProp$delegate.<anonymous>' type=kotlin.String origin=null
@11:22..25 GET_VAR 'old: @[ParameterName(name = 'oldValue')] kotlin.String declared in <root>.MyClass.observableProp$delegate.<anonymous>' type=@[ParameterName(name = 'oldValue')] kotlin.String origin=null
@11:25..31 CONST String type=kotlin.String value=", now "
@11:32..35 GET_VAR 'new: kotlin.String declared in <root>.MyClass.observableProp$delegate.<anonymous>' type=kotlin.String origin=null
@11:32..35 GET_VAR 'new: @[ParameterName(name = 'newValue')] kotlin.String declared in <root>.MyClass.observableProp$delegate.<anonymous>' type=@[ParameterName(name = 'newValue')] kotlin.String origin=null
@10:4..12:5 FUN DELEGATED_PROPERTY_ACCESSOR name:<get-observableProp> visibility:public modality:FINAL <> ($this:<root>.MyClass) returnType:kotlin.String
@10:4..12:5 VALUE_PARAMETER name:<this> type:<root>.MyClass
@10:34..12:5 BLOCK_BODY
@@ -4,6 +4,6 @@
}
public abstract interface Foo<T : R|@R|test/A|() kotlin/Number|> : R|@R|test/A|() java/io/Serializable| {
public abstract fun <E, F : R|E|> bar(): R|kotlin/Unit|
public abstract fun <E, F : R|@R|test/A|() E|> bar(): R|kotlin/Unit|
}
@@ -4,6 +4,6 @@
}
public abstract interface Foo<T : R|@R|test/A|() kotlin/Number|> : R|@R|test/A|() java/io/Serializable| {
public abstract fun <E, F : R|E|> bar(): R|kotlin/Unit|
public abstract fun <E, F : R|@R|test/A|() E|> bar(): R|kotlin/Unit|
}
@@ -4,6 +4,6 @@
}
public abstract interface Foo<T : R|@R|test/A|() kotlin/Number|> : R|@R|test/A|() kotlin/io/Serializable| {
public abstract fun <E, F : R|E|> bar(): R|kotlin/Unit|
public abstract fun <E, F : R|@R|test/A|() E|> bar(): R|kotlin/Unit|
}
@@ -19161,6 +19161,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/fir/nestedClassTypeParameterDeserialization.kt");
}
@Test
@TestMetadata("noInfer.kt")
public void testNoInfer() throws Exception {
runTest("compiler/testData/codegen/box/fir/noInfer.kt");
}
@Test
@TestMetadata("noSymbolForIntRangeIterator.kt")
public void testNoSymbolForIntRangeIterator() throws Exception {
@@ -19161,6 +19161,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
runTest("compiler/testData/codegen/box/fir/nestedClassTypeParameterDeserialization.kt");
}
@Test
@TestMetadata("noInfer.kt")
public void testNoInfer() throws Exception {
runTest("compiler/testData/codegen/box/fir/noInfer.kt");
}
@Test
@TestMetadata("noSymbolForIntRangeIterator.kt")
public void testNoSymbolForIntRangeIterator() throws Exception {
@@ -15956,6 +15956,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/fir/nestedClassTypeParameterDeserialization.kt");
}
@TestMetadata("noInfer.kt")
public void testNoInfer() throws Exception {
runTest("compiler/testData/codegen/box/fir/noInfer.kt");
}
@TestMetadata("noSymbolForIntRangeIterator.kt")
public void testNoSymbolForIntRangeIterator() throws Exception {
runTest("compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.kt");
@@ -434,12 +434,12 @@ FILE: metaSerializable.kt
lval reconstructed: R|Project2| = Q|kotlinx/serialization/json/Json|.R|kotlinx/serialization/json/Json.decodeFromString|<R|Project2|>(Q|Project2|.R|/Project2.Companion.serializer|(), R|<local>/string|)
R|kotlin/test/assertEquals|<R|kotlin/String|>(String(name), R|<local>/reconstructed|.R|/Project2.name|)
R|kotlin/test/assertEquals|<R|kotlin/String|>(String(lang), R|<local>/reconstructed|.R|/Project2.language|)
lval info: R|MySerializableWithInfo| = Q|Project2|.R|/Project2.Companion.serializer|().R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.annotations|.R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|MySerializableWithInfo|>()
lval info: R|@NoInfer MySerializableWithInfo| = Q|Project2|.R|/Project2.Companion.serializer|().R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.annotations|.R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|@NoInfer MySerializableWithInfo|>()
R|kotlin/test/assertEquals|<R|kotlin/Int|>(Int(123), R|<local>/info|.R|/MySerializableWithInfo.value|)
R|kotlin/test/assertEquals|<R|kotlin/reflect/KClass<out kotlin/Any>|>(<getClass>(Q|kotlin/String|), R|<local>/info|.R|/MySerializableWithInfo.kclass|)
}
public final fun testMetaSerializableOnProperty(): R|kotlin/Unit| {
lval info: R|MySerializableWithInfo| = Q|Wrapper|.R|/Wrapper.Companion.serializer|().R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.getElementAnnotations|(Int(0)).R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|MySerializableWithInfo|>()
lval info: R|@NoInfer MySerializableWithInfo| = Q|Wrapper|.R|/Wrapper.Companion.serializer|().R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.getElementAnnotations|(Int(0)).R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|@NoInfer MySerializableWithInfo|>()
R|kotlin/test/assertEquals|<R|kotlin/Int|>(Int(234), R|<local>/info|.R|/MySerializableWithInfo.value|)
R|kotlin/test/assertEquals|<R|kotlin/reflect/KClass<out kotlin/Any>|>(<getClass>(Q|kotlin/Int|), R|<local>/info|.R|/MySerializableWithInfo.kclass|)
}
@@ -449,7 +449,7 @@ FILE: metaSerializable.kt
lval reconstructed: R|Project3| = Q|kotlinx/serialization/json/Json|.R|kotlinx/serialization/json/Json.decodeFromString|<R|Project3|>(Q|Project3|.R|/Project3.Companion.serializer|(), R|<local>/string|)
R|kotlin/test/assertEquals|<R|kotlin/String|>(String(name), R|<local>/reconstructed|.R|/Project3.name|)
R|kotlin/test/assertEquals|<R|kotlin/String|>(String(lang), R|<local>/reconstructed|.R|/Project3.language|)
lval info: R|MySerializableWithInfo| = Q|Project3|.R|/Project3.Companion.serializer|().R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.annotations|.R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|MySerializableWithInfo|>()
lval info: R|@NoInfer MySerializableWithInfo| = Q|Project3|.R|/Project3.Companion.serializer|().R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.annotations|.R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|@NoInfer MySerializableWithInfo|>()
R|kotlin/test/assertEquals|<R|kotlin/Int|>(Int(123), R|<local>/info|.R|/MySerializableWithInfo.value|)
R|kotlin/test/assertEquals|<R|kotlin/reflect/KClass<out kotlin/Any>|>(<getClass>(Q|kotlin/String|), R|<local>/info|.R|/MySerializableWithInfo.kclass|)
}
@@ -465,8 +465,8 @@ FILE: metaSerializable.kt
lval serializerB: R|kotlinx/serialization/KSerializer<TestSealed.B>| = Q|TestSealed.B|.R|/TestSealed.B.Companion.serializer|()
R|kotlin/test/assertNotNull|<R|kotlinx/serialization/KSerializer<TestSealed.A>|>(R|<local>/serializerA|)
R|kotlin/test/assertNotNull|<R|kotlinx/serialization/KSerializer<TestSealed.B>|>(R|<local>/serializerB|)
lval infoA: R|MySerializableWithInfo| = R|<local>/serializerA|.R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.annotations|.R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|MySerializableWithInfo|>()
lval infoB: R|MySerializableWithInfo| = R|<local>/serializerB|.R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.annotations|.R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|MySerializableWithInfo|>()
lval infoA: R|@NoInfer MySerializableWithInfo| = R|<local>/serializerA|.R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.annotations|.R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|@NoInfer MySerializableWithInfo|>()
lval infoB: R|@NoInfer MySerializableWithInfo| = R|<local>/serializerB|.R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.annotations|.R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|@NoInfer MySerializableWithInfo|>()
R|kotlin/test/assertEquals|<R|kotlin/Int|>(Int(123), R|<local>/infoA|.R|/MySerializableWithInfo.value|)
R|kotlin/test/assertEquals|<R|kotlin/reflect/KClass<out kotlin/Any>|>(<getClass>(Q|kotlin/String|), R|<local>/infoA|.R|/MySerializableWithInfo.kclass|)
R|kotlin/test/assertEquals|<R|kotlin/Int|>(Int(123), R|<local>/infoB|.R|/MySerializableWithInfo.value|)
@@ -477,8 +477,8 @@ FILE: metaSerializable.kt
lval serializerB: R|kotlinx/serialization/KSerializer<TestAbstract.B>| = Q|TestAbstract.B|.R|/TestAbstract.B.Companion.serializer|()
R|kotlin/test/assertNotNull|<R|kotlinx/serialization/KSerializer<TestAbstract.A>|>(R|<local>/serializerA|)
R|kotlin/test/assertNotNull|<R|kotlinx/serialization/KSerializer<TestAbstract.B>|>(R|<local>/serializerB|)
lval infoA: R|MySerializableWithInfo| = R|<local>/serializerA|.R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.annotations|.R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|MySerializableWithInfo|>()
lval infoB: R|MySerializableWithInfo| = R|<local>/serializerB|.R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.annotations|.R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|MySerializableWithInfo|>()
lval infoA: R|@NoInfer MySerializableWithInfo| = R|<local>/serializerA|.R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.annotations|.R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|@NoInfer MySerializableWithInfo|>()
lval infoB: R|@NoInfer MySerializableWithInfo| = R|<local>/serializerB|.R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.annotations|.R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|@NoInfer MySerializableWithInfo|>()
R|kotlin/test/assertEquals|<R|kotlin/Int|>(Int(123), R|<local>/infoA|.R|/MySerializableWithInfo.value|)
R|kotlin/test/assertEquals|<R|kotlin/reflect/KClass<out kotlin/Any>|>(<getClass>(Q|kotlin/String|), R|<local>/infoA|.R|/MySerializableWithInfo.kclass|)
R|kotlin/test/assertEquals|<R|kotlin/Int|>(Int(123), R|<local>/infoB|.R|/MySerializableWithInfo.value|)
@@ -487,14 +487,14 @@ FILE: metaSerializable.kt
public final fun testEnum(): R|kotlin/Unit| {
lval serializer: R|kotlinx/serialization/KSerializer<TestEnum>| = Q|TestEnum|.R|/TestEnum.Companion.serializer|()
R|kotlin/test/assertNotNull|<R|kotlinx/serialization/KSerializer<TestEnum>|>(R|<local>/serializer|)
lval info: R|MySerializableWithInfo| = R|<local>/serializer|.R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.annotations|.R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|MySerializableWithInfo|>()
lval info: R|@NoInfer MySerializableWithInfo| = R|<local>/serializer|.R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.annotations|.R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|@NoInfer MySerializableWithInfo|>()
R|kotlin/test/assertEquals|<R|kotlin/Int|>(Int(123), R|<local>/info|.R|/MySerializableWithInfo.value|)
R|kotlin/test/assertEquals|<R|kotlin/reflect/KClass<out kotlin/Any>|>(<getClass>(Q|kotlin/String|), R|<local>/info|.R|/MySerializableWithInfo.kclass|)
}
public final fun testObject(): R|kotlin/Unit| {
lval serializer: R|kotlinx/serialization/KSerializer<TestObject>| = Q|TestObject|.R|/TestObject.serializer|()
R|kotlin/test/assertNotNull|<R|kotlinx/serialization/KSerializer<TestObject>|>(R|<local>/serializer|)
lval info: R|MySerializableWithInfo| = R|<local>/serializer|.R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.annotations|.R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|MySerializableWithInfo|>()
lval info: R|@NoInfer MySerializableWithInfo| = R|<local>/serializer|.R|SubstitutionOverride<kotlinx/serialization/KSerializer.descriptor: R|kotlinx/serialization/descriptors/SerialDescriptor|>|.R|kotlinx/serialization/descriptors/SerialDescriptor.annotations|.R|kotlin/collections/filterIsInstance|<R|MySerializableWithInfo|>().R|kotlin/collections/first|<R|@NoInfer MySerializableWithInfo|>()
R|kotlin/test/assertEquals|<R|kotlin/Int|>(Int(123), R|<local>/info|.R|/MySerializableWithInfo.value|)
R|kotlin/test/assertEquals|<R|kotlin/reflect/KClass<out kotlin/Any>|>(<getClass>(Q|kotlin/String|), R|<local>/info|.R|/MySerializableWithInfo.kclass|)
}