IR: relax type cast for WrappedVariableDescriptor.containingDeclaration
This commit is contained in:
@@ -308,7 +308,7 @@ fun IrTypeParameter.toIrBasedDescriptor() = IrBasedTypeParameterDescriptor(this)
|
||||
|
||||
open class IrBasedVariableDescriptor(owner: IrVariable) : VariableDescriptor, IrBasedCallableDescriptor<IrVariable>(owner) {
|
||||
|
||||
override fun getContainingDeclaration() = (owner.parent as IrFunction).toIrBasedDescriptor()
|
||||
override fun getContainingDeclaration() = (owner.parent as IrDeclaration).toIrBasedDescriptor()
|
||||
override fun getType() = owner.type.toIrBasedKotlinType()
|
||||
override fun getReturnType() = getType()
|
||||
override fun getName() = owner.name
|
||||
|
||||
@@ -303,7 +303,7 @@ open class WrappedTypeParameterDescriptor : TypeParameterDescriptor, WrappedDecl
|
||||
@OptIn(ObsoleteDescriptorBasedAPI::class)
|
||||
open class WrappedVariableDescriptor : VariableDescriptor, WrappedCallableDescriptor<IrVariable>() {
|
||||
|
||||
override fun getContainingDeclaration() = (owner.parent as IrFunction).descriptor
|
||||
override fun getContainingDeclaration() = (owner.parent as IrDeclaration).descriptor
|
||||
override fun getType() = owner.type.toKotlinType()
|
||||
override fun getReturnType() = getType()
|
||||
override fun getName() = owner.name
|
||||
|
||||
Reference in New Issue
Block a user