[FE] Support context receivers on classes

This commit is contained in:
Anastasiya Shadrina
2020-08-20 14:11:50 +07:00
committed by TeamCityServer
parent c34fe8d547
commit f4ddf66ac4
19 changed files with 232 additions and 5 deletions
@@ -608,6 +608,10 @@ open class IrBasedClassDescriptor(owner: IrClass) : ClassDescriptor, IrBasedDecl
override fun getThisAsReceiverParameter() = owner.thisReceiver?.toIrBasedDescriptor() as ReceiverParameterDescriptor
override fun getContextReceivers(): List<ReceiverParameterDescriptor> {
TODO("Not yet implemented")
}
override fun getUnsubstitutedPrimaryConstructor() =
owner.declarations.filterIsInstance<IrConstructor>().singleOrNull { it.isPrimary }?.toIrBasedDescriptor()
@@ -734,6 +738,10 @@ open class IrBasedEnumEntryDescriptor(owner: IrEnumEntry) : ClassDescriptor, IrB
override fun getThisAsReceiverParameter() = (owner.parent as IrClass).toIrBasedDescriptor().thisAsReceiverParameter
override fun getContextReceivers(): List<ReceiverParameterDescriptor> {
TODO("Not yet implemented")
}
override fun getUnsubstitutedPrimaryConstructor(): ClassConstructorDescriptor? {
TODO("not implemented")
}