[NI] Refactor UnstableSmartCast diagnostic
Split diagnostic classes for unstable smartcast with different resolution applicability. ^KT-36264 Fixed
This commit is contained in:
+2
-1
@@ -121,7 +121,8 @@ class DiagnosticReporterByTrackingStrategy(
|
||||
override fun onCallArgument(callArgument: KotlinCallArgument, diagnostic: KotlinCallDiagnostic) {
|
||||
when (diagnostic.javaClass) {
|
||||
SmartCastDiagnostic::class.java -> reportSmartCast(diagnostic as SmartCastDiagnostic)
|
||||
UnstableSmartCast::class.java -> reportUnstableSmartCast(diagnostic as UnstableSmartCast)
|
||||
UnstableSmartCastDiagnosticError::class.java,
|
||||
UnstableSmartCastResolutionError::class.java -> reportUnstableSmartCast(diagnostic as UnstableSmartCast)
|
||||
TooManyArguments::class.java -> {
|
||||
trace.reportTrailingLambdaErrorOr(callArgument.psiExpression) { expr ->
|
||||
TOO_MANY_ARGUMENTS.on(expr, (diagnostic as TooManyArguments).descriptor)
|
||||
|
||||
Reference in New Issue
Block a user