From c2ead0303b50858aaf8715b5ed090f4a41541ec0 Mon Sep 17 00:00:00 2001 From: Georgy Bronnikov Date: Thu, 23 Jul 2020 15:14:09 +0300 Subject: [PATCH] IR: remove more descriptor usage --- .../ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt index d70b6476b10..55e6ecef099 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt @@ -304,16 +304,14 @@ tailrec fun IrElement.getPackageFragment(): IrPackageFragment? { } } -@OptIn(ObsoleteDescriptorBasedAPI::class) fun IrAnnotationContainer.getAnnotation(name: FqName): IrConstructorCall? = annotations.find { - it.symbol.owner.parentAsClass.descriptor.fqNameSafe == name + it.symbol.owner.parentAsClass.fqNameWhenAvailable == name } -@OptIn(ObsoleteDescriptorBasedAPI::class) fun IrAnnotationContainer.hasAnnotation(name: FqName) = annotations.any { - it.symbol.owner.parentAsClass.descriptor.fqNameSafe == name + it.symbol.owner.parentAsClass.fqNameWhenAvailable == name } fun IrAnnotationContainer.hasAnnotation(symbol: IrClassSymbol) =