Minor, make ownTypeParameters a property in TypeDeserializer
This commit is contained in:
+2
-2
@@ -55,7 +55,7 @@ public class MemberDeserializer(private val c: DeserializationContext) {
|
|||||||
val local = c.childContext(property, proto.getTypeParameterList())
|
val local = c.childContext(property, proto.getTypeParameterList())
|
||||||
property.setType(
|
property.setType(
|
||||||
local.typeDeserializer.type(proto.getReturnType()),
|
local.typeDeserializer.type(proto.getReturnType()),
|
||||||
local.typeDeserializer.getOwnTypeParameters(),
|
local.typeDeserializer.ownTypeParameters,
|
||||||
getDispatchReceiverParameter(),
|
getDispatchReceiverParameter(),
|
||||||
if (proto.hasReceiverType()) local.typeDeserializer.type(proto.getReceiverType()) else null
|
if (proto.hasReceiverType()) local.typeDeserializer.type(proto.getReceiverType()) else null
|
||||||
)
|
)
|
||||||
@@ -131,7 +131,7 @@ public class MemberDeserializer(private val c: DeserializationContext) {
|
|||||||
function.initialize(
|
function.initialize(
|
||||||
if (proto.hasReceiverType()) local.typeDeserializer.type(proto.getReceiverType()) else null,
|
if (proto.hasReceiverType()) local.typeDeserializer.type(proto.getReceiverType()) else null,
|
||||||
getDispatchReceiverParameter(),
|
getDispatchReceiverParameter(),
|
||||||
local.typeDeserializer.getOwnTypeParameters(),
|
local.typeDeserializer.ownTypeParameters,
|
||||||
local.memberDeserializer.valueParameters(proto, AnnotatedCallableKind.FUNCTION),
|
local.memberDeserializer.valueParameters(proto, AnnotatedCallableKind.FUNCTION),
|
||||||
local.typeDeserializer.type(proto.getReturnType()),
|
local.typeDeserializer.type(proto.getReturnType()),
|
||||||
modality(Flags.MODALITY.get(proto.getFlags())),
|
modality(Flags.MODALITY.get(proto.getFlags())),
|
||||||
|
|||||||
+2
-1
@@ -48,7 +48,8 @@ public class TypeDeserializer(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getOwnTypeParameters(): List<TypeParameterDescriptor> = typeParameterDescriptors().values().toReadOnlyList()
|
val ownTypeParameters: List<TypeParameterDescriptor>
|
||||||
|
get() = typeParameterDescriptors().values().toReadOnlyList()
|
||||||
|
|
||||||
fun type(proto: ProtoBuf.Type): JetType {
|
fun type(proto: ProtoBuf.Type): JetType {
|
||||||
if (proto.hasFlexibleTypeCapabilitiesId()) {
|
if (proto.hasFlexibleTypeCapabilitiesId()) {
|
||||||
|
|||||||
+1
-1
@@ -144,7 +144,7 @@ public class DeserializedClassDescriptor(
|
|||||||
private inner class DeserializedClassTypeConstructor : AbstractClassTypeConstructor() {
|
private inner class DeserializedClassTypeConstructor : AbstractClassTypeConstructor() {
|
||||||
private val supertypes = computeSuperTypes()
|
private val supertypes = computeSuperTypes()
|
||||||
|
|
||||||
override fun getParameters() = c.typeDeserializer.getOwnTypeParameters()
|
override fun getParameters() = c.typeDeserializer.ownTypeParameters
|
||||||
|
|
||||||
override fun getSupertypes(): Collection<JetType> {
|
override fun getSupertypes(): Collection<JetType> {
|
||||||
// We cannot have error supertypes because subclasses inherit error functions from them
|
// We cannot have error supertypes because subclasses inherit error functions from them
|
||||||
|
|||||||
Reference in New Issue
Block a user