IR: minor, make IrClass.companionObject return IrClass

This commit is contained in:
Alexander Udalov
2020-09-11 17:56:31 +02:00
parent 2f86554d5a
commit fc141a52da
5 changed files with 8 additions and 8 deletions
@@ -100,7 +100,8 @@ val IrDeclaration.fileEntry: SourceManager.FileEntry
}
}
fun IrClass.companionObject() = this.declarations.singleOrNull {it is IrClass && it.isCompanion }
fun IrClass.companionObject(): IrClass? =
this.declarations.singleOrNull { it is IrClass && it.isCompanion } as IrClass?
val IrDeclaration.isGetter get() = this is IrSimpleFunction && this == this.correspondingPropertySymbol?.owner?.getter