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:
+6
@@ -3079,6 +3079,12 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Generic.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("TypeAliasToExtension.kt")
|
||||
public void testTypeAliasToExtension() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/TypeAliasToExtension.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledKotlin/visibility")
|
||||
|
||||
+4
-1
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user