Use extension registry when unpacking serialized type alias

It's funny here that "extension" here means protobuf extensions
while initial issue is about extension function types

 #Fixed KT-22728
This commit is contained in:
Denis Zharkov
2018-02-07 11:17:22 +03:00
parent fbef21bf17
commit 2ad93a0330
7 changed files with 43 additions and 1 deletions
@@ -152,7 +152,10 @@ abstract class DeserializedMemberScope protected constructor(
private fun createTypeAlias(name: Name): TypeAliasDescriptor? {
val byteArray = typeAliasBytes[name] ?: return null
val proto = ProtoBuf.TypeAlias.parseDelimitedFrom(ByteArrayInputStream(byteArray)) ?: return null
val proto =
ProtoBuf.TypeAlias.parseDelimitedFrom(
ByteArrayInputStream(byteArray), c.components.extensionRegistryLite
) ?: return null
return c.memberDeserializer.loadTypeAlias(proto)
}