Psi2Ir: Mark accessors with no bodies as default accessors.
They are currently marked as defined even when they get a default implementation. That makes it hard to figure out if the accessor should be removed when introducing a backing field in the JVM_IR backend.
This commit is contained in:
committed by
Alexander Udalov
parent
fda37eaaae
commit
6c7a904663
+1
-1
@@ -112,7 +112,7 @@ class FunctionGenerator(declarationGenerator: DeclarationGenerator) : Declaratio
|
||||
declareSimpleFunctionInner(
|
||||
descriptor,
|
||||
ktAccessor ?: ktProperty,
|
||||
if (ktAccessor != null) IrDeclarationOrigin.DEFINED else IrDeclarationOrigin.DEFAULT_PROPERTY_ACCESSOR
|
||||
if (ktAccessor != null && ktAccessor.hasBody()) IrDeclarationOrigin.DEFINED else IrDeclarationOrigin.DEFAULT_PROPERTY_ACCESSOR
|
||||
).buildWithScope { irAccessor ->
|
||||
declarationGenerator.generateScopedTypeParameterDeclarations(irAccessor, descriptor.correspondingProperty.typeParameters)
|
||||
irAccessor.returnType = irAccessor.descriptor.returnType!!.toIrType()
|
||||
|
||||
Reference in New Issue
Block a user