Slide 16
Slide 16 text
runBlocking をエラーにするロジック
object NoRunBlockingChecker : FirFunctionCallChecker(MppCheckerKind.Common) {
}
context(context: CheckerContext, reporter: DiagnosticReporter)
override fun check(expression: FirFunctionCall) {
val callee = expression.toResolvedCallableSymbol() ?: return
if (callee.callableId != RUN_BLOCKING) return
reporter.reportOn(expression.source, MyErrors.NO_RUN_BLOCKING)
}
private val RUN_BLOCKING =
CallableId(FqName("kotlinx.coroutines"), Name.identifier("runBlocking"))
16 / 47