A little fix to allow Wrapped and non-Wrapped descriptors to coexist.

This commit is contained in:
Alexander Gorshenev
2019-01-11 16:18:55 +03:00
committed by alexander-gorshenev
parent cea32bd4e3
commit 1ba4770800
@@ -90,7 +90,7 @@ internal class DeepCopyIrTreeWithSymbolsForInliner(val context: Context,
}
override fun visitField(declaration: IrField) {
(declaration.descriptor as WrappedFieldDescriptor).bind(declaration)
(declaration.descriptor as? WrappedFieldDescriptor)?.bind(declaration)
declaration.acceptChildrenVoid(this)
}
@@ -1085,4 +1085,4 @@ internal class DescriptorSubstitutorForExternalScope(
return oldExpression.shallowCopy(oldExpression.origin, createFunctionSymbol(newDescriptor), oldExpression.superQualifierSymbol)
}
}
}