Add serialization/deserialization of definitely-not-null types

^KT-26245 In Progress
This commit is contained in:
Denis.Zharkov
2021-04-06 17:42:56 +03:00
committed by TeamCityServer
parent 6ca6bb2d45
commit 30eb9ad32f
19 changed files with 98 additions and 11 deletions
@@ -584,7 +584,7 @@ class DescriptorSerializer private constructor(
if (type.isSuspendFunctionType) {
val functionType = type(transformSuspendFunctionToRuntimeFunctionType(type, extension.releaseCoroutines()))
functionType.flags = Flags.getTypeFlags(true)
functionType.flags = Flags.getTypeFlags(true, false)
return functionType
}
@@ -600,6 +600,8 @@ class DescriptorSerializer private constructor(
builder.typeParameter = getTypeParameterId(descriptor)
}
builder.flags = Flags.getTypeFlags(false, type is DefinitelyNotNullType)
assert(type.arguments.isEmpty()) { "Found arguments for type constructor build on type parameter: $descriptor" }
}
}