Properly process the absence of protobuf field.

This commit is contained in:
Alexander Gorshenev
2017-04-27 17:32:17 +03:00
committed by alexander-gorshenev
parent 67867dd6fb
commit cbce4cf994
@@ -98,11 +98,12 @@ class LocalDeclarationDeserializer(val rootDescriptor: DeserializedCallableMembe
} }
private fun memberDeserializer(irProto: KonanIr.KotlinDescriptor): MemberDeserializer { private fun memberDeserializer(irProto: KonanIr.KotlinDescriptor): MemberDeserializer {
val containingFqName = irProto.classOrPackage return if (irProto.hasClassOrPackage()) {
return if (containingFqName != null) { memberDeserializerByParentFqNameIndex(irProto.classOrPackage)
memberDeserializerByParentFqNameIndex(containingFqName) } else {
// TODO: learn to take the containing IR declaration // TODO: learn to take the containing IR declaration
} else this.memberDeserializer this.memberDeserializer
}
} }
fun deserializeFunction(irProto: KonanIr.KotlinDescriptor): FunctionDescriptor = fun deserializeFunction(irProto: KonanIr.KotlinDescriptor): FunctionDescriptor =