[IR] Add wrapped descriptor for error declaration
This commit is contained in:
@@ -1049,6 +1049,24 @@ open class WrappedFieldDescriptor : PropertyDescriptor, WrappedDeclarationDescri
|
|||||||
override fun <V : Any?> getUserData(key: CallableDescriptor.UserDataKey<V>?): V? = null
|
override fun <V : Any?> getUserData(key: CallableDescriptor.UserDataKey<V>?): V? = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class WrappedErrorDescriptor : WrappedDeclarationDescriptor<IrErrorDeclaration>() {
|
||||||
|
override fun getName(): Name = error("WrappedErrorDescriptor.getName: Should not be reached")
|
||||||
|
|
||||||
|
override fun getOriginal(): DeclarationDescriptorWithSource =
|
||||||
|
error("WrappedErrorDescriptor.getOriginal: Should not be reached")
|
||||||
|
|
||||||
|
override fun getContainingDeclaration(): DeclarationDescriptor? =
|
||||||
|
error("WrappedErrorDescriptor.getContainingDeclaration: Should not be reached")
|
||||||
|
|
||||||
|
override fun <R : Any?, D : Any?> accept(visitor: DeclarationDescriptorVisitor<R, D>?, data: D): R {
|
||||||
|
error("WrappedErrorDescriptor.accept: Should not be reached")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun acceptVoid(visitor: DeclarationDescriptorVisitor<Void, Void>?) {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@OptIn(ObsoleteDescriptorBasedAPI::class)
|
@OptIn(ObsoleteDescriptorBasedAPI::class)
|
||||||
private fun getContainingDeclaration(declaration: IrDeclarationWithName): DeclarationDescriptor {
|
private fun getContainingDeclaration(declaration: IrDeclarationWithName): DeclarationDescriptor {
|
||||||
val parent = declaration.parent
|
val parent = declaration.parent
|
||||||
|
|||||||
Reference in New Issue
Block a user