reportError

fun MessageCollector.reportError(function: IrFunction, message: String): Nothing?(source)

Reports a compilation error anchored at function, failing the build. Returns null so it can be used as ?: return messageCollector.reportError(...) from functions with a nullable return type.