[IR] Use only empty constructor to create WrappedDescriptor

This commit is contained in:
Roman Artemev
2020-08-26 20:47:46 +03:00
parent fd88914cf9
commit c7b57c0fb3
8 changed files with 19 additions and 21 deletions
@@ -515,8 +515,8 @@ class Fir2IrDeclarationStorage(
): IrSimpleFunction {
if (signature == null) {
val descriptor =
if (isGetter) WrappedPropertyGetterDescriptor(Annotations.EMPTY, SourceElement.NO_SOURCE)
else WrappedPropertySetterDescriptor(Annotations.EMPTY, SourceElement.NO_SOURCE)
if (isGetter) WrappedPropertyGetterDescriptor()
else WrappedPropertySetterDescriptor()
return symbolTable.declareSimpleFunction(descriptor, factory).apply { descriptor.bind(this) }
}
return symbolTable.declareSimpleFunction(signature, { Fir2IrSimpleFunctionSymbol(signature, containerSource) }, factory)
@@ -47,9 +47,9 @@ abstract class Fir2IrBindableSymbol<out D : DeclarationDescriptor, B : IrSymbolO
containerSource != null ->
WrappedFunctionDescriptorWithContainerSource()
owner.name.isSpecial && owner.name.asString().startsWith(GETTER_PREFIX) ->
WrappedPropertyGetterDescriptor(Annotations.EMPTY, SourceElement.NO_SOURCE)
WrappedPropertyGetterDescriptor()
owner.name.isSpecial && owner.name.asString().startsWith(SETTER_PREFIX) ->
WrappedPropertySetterDescriptor(Annotations.EMPTY, SourceElement.NO_SOURCE)
WrappedPropertySetterDescriptor()
else ->
WrappedSimpleFunctionDescriptor()
}.apply { bind(owner) }