[IR/FIR] Use isExpect from IR element instead of descriptor in
ExpectDeclarationRemover.
This commit is contained in:
committed by
Alexander Udalov
parent
23c4eac45b
commit
371c4561a0
@@ -53,8 +53,12 @@ class ExpectDeclarationRemover(val symbolTable: ReferenceSymbolTable, private va
|
||||
}
|
||||
|
||||
private fun shouldRemoveTopLevelDeclaration(declaration: IrDeclaration): Boolean {
|
||||
val descriptor = declaration.descriptor
|
||||
return doRemove && descriptor is MemberDescriptor && descriptor.isExpect
|
||||
return doRemove && when (declaration) {
|
||||
is IrClass -> declaration.isExpect
|
||||
is IrProperty -> declaration.isExpect
|
||||
is IrFunction -> declaration.isExpect
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
private fun tryCopyDefaultArguments(declaration: IrValueParameter) {
|
||||
|
||||
Reference in New Issue
Block a user