Add docs to CandidateApplicability, remove DSL_SCOPE_VIOLATION

This commit is contained in:
Mikhail Glukhikh
2022-07-26 14:23:55 +02:00
committed by Space
parent d0c518013a
commit 3e58c54da9
5 changed files with 117 additions and 30 deletions
@@ -157,7 +157,7 @@ class NotCallableExpectedType(
) : CallableReferenceInapplicableDiagnostic(argument)
class AdaptedCallableReferenceIsUsedWithReflection(val argument: CallableReferenceResolutionAtom) :
CallableReferenceInapplicableDiagnostic(argument, K1_RESOLVED_WITH_ERROR)
CallableReferenceInapplicableDiagnostic(argument, RESOLVED_WITH_ERROR)
// SmartCasts
class SmartCastDiagnostic(
@@ -194,7 +194,7 @@ class UnstableSmartCastResolutionError(
class UnstableSmartCastDiagnosticError(
argument: ExpressionKotlinCallArgument,
targetType: UnwrappedType,
) : UnstableSmartCast(argument, targetType, K1_RESOLVED_WITH_ERROR)
) : UnstableSmartCast(argument, targetType, RESOLVED_WITH_ERROR)
class UnsafeCallError(
val receiver: SimpleKotlinCallArgument,
@@ -282,7 +282,7 @@ class ResolvedToSamWithVarargDiagnostic(val argument: KotlinCallArgument) : Kotl
class NotEnoughInformationForLambdaParameter(
val lambdaArgument: LambdaKotlinCallArgument,
val parameterIndex: Int
) : KotlinCallDiagnostic(K1_RESOLVED_WITH_ERROR) {
) : KotlinCallDiagnostic(RESOLVED_WITH_ERROR) {
override fun report(reporter: DiagnosticReporter) {
reporter.onCallArgument(lambdaArgument, this)
}
@@ -114,13 +114,13 @@ abstract class ResolutionDiagnostic(candidateApplicability: CandidateApplicabili
}
}
class ContextReceiverAmbiguity : ResolutionDiagnostic(K1_RESOLVED_WITH_ERROR) {
class ContextReceiverAmbiguity : ResolutionDiagnostic(RESOLVED_WITH_ERROR) {
override fun report(reporter: DiagnosticReporter) {
reporter.onCall(this)
}
}
class UnsupportedContextualDeclarationCall : ResolutionDiagnostic(K1_RESOLVED_WITH_ERROR) {
class UnsupportedContextualDeclarationCall : ResolutionDiagnostic(RESOLVED_WITH_ERROR) {
override fun report(reporter: DiagnosticReporter) {
reporter.onCall(this)
}