From 5fe1e0c1a56e2e38939d3dfc73120452bdcce4d4 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Wed, 14 Feb 2024 11:30:35 +0200 Subject: [PATCH] [FIR] Allow nullable type arguments in diagnostic reporting utilities Commit cceb7197 removed restriction of non-nullability of diagnostic arguments, but corresponding utilities were not updated --- .../KtDiagnosticReportContextHelpers.kt | 16 ++++++++-------- .../diagnostics/KtDiagnosticReportHelpers.kt | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/compiler/frontend.common/src/org/jetbrains/kotlin/diagnostics/KtDiagnosticReportContextHelpers.kt b/compiler/frontend.common/src/org/jetbrains/kotlin/diagnostics/KtDiagnosticReportContextHelpers.kt index a8f29a01565..e3087a90b87 100644 --- a/compiler/frontend.common/src/org/jetbrains/kotlin/diagnostics/KtDiagnosticReportContextHelpers.kt +++ b/compiler/frontend.common/src/org/jetbrains/kotlin/diagnostics/KtDiagnosticReportContextHelpers.kt @@ -17,7 +17,7 @@ fun DiagnosticReporter.reportOn( } context(DiagnosticContext) -fun DiagnosticReporter.reportOn( +fun DiagnosticReporter.reportOn( source: AbstractKtSourceElement?, factory: KtDiagnosticFactory1, a: A, @@ -27,7 +27,7 @@ fun DiagnosticReporter.reportOn( } context(DiagnosticContext) -fun DiagnosticReporter.reportOn( +fun DiagnosticReporter.reportOn( source: AbstractKtSourceElement?, factory: KtDiagnosticFactory2, a: A, @@ -38,7 +38,7 @@ fun DiagnosticReporter.reportOn( } context(DiagnosticContext) -fun DiagnosticReporter.reportOn( +fun DiagnosticReporter.reportOn( source: AbstractKtSourceElement?, factory: KtDiagnosticFactory3, a: A, @@ -50,7 +50,7 @@ fun DiagnosticReporter.reportOn( } context(DiagnosticContext) -fun DiagnosticReporter.reportOn( +fun DiagnosticReporter.reportOn( source: AbstractKtSourceElement?, factory: KtDiagnosticFactory4, a: A, @@ -72,7 +72,7 @@ fun DiagnosticReporter.reportOn( } context(DiagnosticContext) -fun DiagnosticReporter.reportOn( +fun DiagnosticReporter.reportOn( source: AbstractKtSourceElement?, factory: KtDiagnosticFactoryForDeprecation1, a: A, @@ -82,7 +82,7 @@ fun DiagnosticReporter.reportOn( } context(DiagnosticContext) -fun DiagnosticReporter.reportOn( +fun DiagnosticReporter.reportOn( source: AbstractKtSourceElement?, factory: KtDiagnosticFactoryForDeprecation2, a: A, @@ -93,7 +93,7 @@ fun DiagnosticReporter.reportOn( } context(DiagnosticContext) -fun DiagnosticReporter.reportOn( +fun DiagnosticReporter.reportOn( source: AbstractKtSourceElement?, factory: KtDiagnosticFactoryForDeprecation3, a: A, @@ -105,7 +105,7 @@ fun DiagnosticReporter.reportOn( } context(DiagnosticContext) -fun DiagnosticReporter.reportOn( +fun DiagnosticReporter.reportOn( source: AbstractKtSourceElement?, factory: KtDiagnosticFactoryForDeprecation4, a: A, diff --git a/compiler/frontend.common/src/org/jetbrains/kotlin/diagnostics/KtDiagnosticReportHelpers.kt b/compiler/frontend.common/src/org/jetbrains/kotlin/diagnostics/KtDiagnosticReportHelpers.kt index d09844e0beb..87283f570ff 100644 --- a/compiler/frontend.common/src/org/jetbrains/kotlin/diagnostics/KtDiagnosticReportHelpers.kt +++ b/compiler/frontend.common/src/org/jetbrains/kotlin/diagnostics/KtDiagnosticReportHelpers.kt @@ -18,7 +18,7 @@ fun DiagnosticReporter.reportOn( report(factory.on(source.requireNotNull(), positioningStrategy), context) } -fun DiagnosticReporter.reportOn( +fun DiagnosticReporter.reportOn( source: AbstractKtSourceElement?, factory: KtDiagnosticFactory1, a: A, @@ -28,7 +28,7 @@ fun DiagnosticReporter.reportOn( report(factory.on(source.requireNotNull(), a, positioningStrategy), context) } -fun DiagnosticReporter.reportOn( +fun DiagnosticReporter.reportOn( source: AbstractKtSourceElement?, factory: KtDiagnosticFactory2, a: A, @@ -39,7 +39,7 @@ fun DiagnosticReporter.reportOn( report(factory.on(source.requireNotNull(), a, b, positioningStrategy), context) } -fun DiagnosticReporter.reportOn( +fun DiagnosticReporter.reportOn( source: AbstractKtSourceElement?, factory: KtDiagnosticFactory3, a: A, @@ -51,7 +51,7 @@ fun DiagnosticReporter.reportOn( report(factory.on(source.requireNotNull(), a, b, c, positioningStrategy), context) } -fun DiagnosticReporter.reportOn( +fun DiagnosticReporter.reportOn( source: AbstractKtSourceElement?, factory: KtDiagnosticFactory4, a: A, @@ -76,7 +76,7 @@ fun DiagnosticReporter.reportOn( reportOn(source, factory.chooseFactory(context), context, positioningStrategy) } -fun DiagnosticReporter.reportOn( +fun DiagnosticReporter.reportOn( source: AbstractKtSourceElement?, factory: KtDiagnosticFactoryForDeprecation1, a: A, @@ -86,7 +86,7 @@ fun DiagnosticReporter.reportOn( reportOn(source, factory.chooseFactory(context), a, context, positioningStrategy) } -fun DiagnosticReporter.reportOn( +fun DiagnosticReporter.reportOn( source: AbstractKtSourceElement?, factory: KtDiagnosticFactoryForDeprecation2, a: A, @@ -97,7 +97,7 @@ fun DiagnosticReporter.reportOn( reportOn(source, factory.chooseFactory(context), a, b, context, positioningStrategy) } -fun DiagnosticReporter.reportOn( +fun DiagnosticReporter.reportOn( source: AbstractKtSourceElement?, factory: KtDiagnosticFactoryForDeprecation3, a: A, @@ -109,7 +109,7 @@ fun DiagnosticReporter.reportOn( reportOn(source, factory.chooseFactory(context), a, b, c, context, positioningStrategy) } -fun DiagnosticReporter.reportOn( +fun DiagnosticReporter.reportOn( source: AbstractKtSourceElement?, factory: KtDiagnosticFactoryForDeprecation4, a: A,