Add minor improvements to psi2ir and IR utilities:
* Generate missing IR parameter declarations in external stubs * Use origin = FAKE_OVERRIDE in external IR stubs for fake overrides * Set .parent in external IR stubs * Set .parent in IR generated by some utility methods
This commit is contained in:
@@ -113,6 +113,7 @@ fun IrClass.addSimpleDelegatingConstructor(superConstructorSymbol: IrConstructor
|
||||
)
|
||||
)
|
||||
|
||||
constructor.parent = this
|
||||
this.declarations.add(constructor)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,9 @@ fun IrFunction.createParameterDeclarations() {
|
||||
innerStartOffset(this), innerEndOffset(this),
|
||||
IrDeclarationOrigin.DEFINED,
|
||||
this
|
||||
)
|
||||
).also {
|
||||
it.parent = this@createParameterDeclarations
|
||||
}
|
||||
|
||||
dispatchReceiverParameter = descriptor.dispatchReceiverParameter?.irValueParameter()
|
||||
extensionReceiverParameter = descriptor.extensionReceiverParameter?.irValueParameter()
|
||||
@@ -140,7 +142,9 @@ fun IrFunction.createParameterDeclarations() {
|
||||
innerStartOffset(it), innerEndOffset(it),
|
||||
IrDeclarationOrigin.DEFINED,
|
||||
it
|
||||
)
|
||||
).also { typeParameter ->
|
||||
typeParameter.parent = this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user