Avoid retaining reference to ProtoBuf.Package in JvmPackagePartSource

Otherwise, 2e933a165a doesn't help
This commit is contained in:
Denis Zharkov
2018-03-15 14:38:37 +03:00
parent 4b78abaa7a
commit c334f46825
2 changed files with 10 additions and 7 deletions
@@ -28,11 +28,7 @@ fun getJvmModuleNameForDeserializedDescriptor(descriptor: DeclarationDescriptor)
descriptor is DeserializedMemberDescriptor -> {
val source = descriptor.containerSource
if (source is JvmPackagePartSource) {
val packageProto = source.packageProto
val nameResolver = source.nameResolver
return packageProto.getExtensionOrNull(JvmProtoBuf.packageModuleName)
?.let(nameResolver::getString)
?: JvmAbi.DEFAULT_MODULE_NAME
return source.moduleName
}
}
}