FIR: add UnsafeCall resolution diagnostics

Previously unsafe call is reported as part of InapplicableWrongReceiver.
This makes it difficult for the downstream checkers to report different
diagnostics.
This commit is contained in:
Tianyu Geng
2021-04-08 21:17:01 +03:00
committed by Mikhail Glukhikh
parent 43a2ad0467
commit 6a03f31e50
62 changed files with 283 additions and 283 deletions
@@ -170,7 +170,7 @@ class UnstableSmartCastDiagnosticError(
class UnsafeCallError(
val receiver: SimpleKotlinCallArgument,
val isForImplicitInvoke: Boolean = false
) : KotlinCallDiagnostic(MAY_THROW_RUNTIME_ERROR) {
) : KotlinCallDiagnostic(UNSAFE_CALL) {
override fun report(reporter: DiagnosticReporter) = reporter.onCallReceiver(receiver, this)
}