From 02a430875f602b1d55fe52eebc1a5d7b3771d39f Mon Sep 17 00:00:00 2001 From: Victor Petukhov Date: Fri, 20 May 2022 14:09:22 +0200 Subject: [PATCH] [FE 1.0] Don't fail candidates which were marked with compatibility resolve previously ^KT-52431 Fixed ^KT-52393 Fixed --- ...CompilerTestFE10TestdataTestGenerated.java | 12 +++++++++ ...irOldFrontendDiagnosticsTestGenerated.java | 12 +++++++++ ...DiagnosticsWithLightTreeTestGenerated.java | 12 +++++++++ .../fir/resolve/calls/ResolutionStages.kt | 8 +++--- .../model/ConstraintPositionAndErrors.kt | 3 ++- .../model/NewConstraintSystemImpl.kt | 6 ++++- .../calls/components/ResolutionParts.kt | 27 +++++++++++-------- .../resolve/calls/model/ResolvedCallAtoms.kt | 11 +++++--- .../resolve/calls/tower/TowerResolver.kt | 13 ++++++++- .../emptyIntersectionTypes/kt52393.fir.kt | 17 ++++++++++++ .../emptyIntersectionTypes/kt52393.kt | 17 ++++++++++++ .../emptyIntersectionTypes/kt52393.txt | 19 +++++++++++++ .../emptyIntersectionTypes/kt52431.fir.kt | 13 +++++++++ .../emptyIntersectionTypes/kt52431.kt | 13 +++++++++ .../emptyIntersectionTypes/kt52431.txt | 24 +++++++++++++++++ .../diagnostics/testsWithStdLib/greater.kt | 2 +- .../test/runners/DiagnosticTestGenerated.java | 12 +++++++++ 17 files changed, 198 insertions(+), 23 deletions(-) create mode 100644 compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52393.fir.kt create mode 100644 compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52393.kt create mode 100644 compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52393.txt create mode 100644 compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52431.fir.kt create mode 100644 compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52431.kt create mode 100644 compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52431.txt diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java index e2b2375dbe6..386e9007bc8 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosisCompilerTestFE10TestdataTestGenerated.java @@ -15593,6 +15593,18 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52364.kt"); } + @Test + @TestMetadata("kt52393.kt") + public void testKt52393() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52393.kt"); + } + + @Test + @TestMetadata("kt52431.kt") + public void testKt52431() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52431.kt"); + } + @Test @TestMetadata("nullableEmptyIntersection.kt") public void testNullableEmptyIntersection() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java index 0e9dcf95185..7456fd5a5c0 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java @@ -15593,6 +15593,18 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52364.kt"); } + @Test + @TestMetadata("kt52393.kt") + public void testKt52393() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52393.kt"); + } + + @Test + @TestMetadata("kt52431.kt") + public void testKt52431() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52431.kt"); + } + @Test @TestMetadata("nullableEmptyIntersection.kt") public void testNullableEmptyIntersection() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java index 6677ee754a7..bd0c5d2f130 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsWithLightTreeTestGenerated.java @@ -15593,6 +15593,18 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52364.kt"); } + @Test + @TestMetadata("kt52393.kt") + public void testKt52393() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52393.kt"); + } + + @Test + @TestMetadata("kt52431.kt") + public void testKt52431() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52431.kt"); + } + @Test @TestMetadata("nullableEmptyIntersection.kt") public void testNullableEmptyIntersection() throws Exception { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionStages.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionStages.kt index 0da9dbee300..ec23f7e68ed 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionStages.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionStages.kt @@ -581,10 +581,10 @@ internal object CheckIncompatibleTypeVariableUpperBounds : ResolutionStage() { val upperTypes = variableWithConstraints.constraints.extractUpperTypesToCheckIntersectionEmptiness() // TODO: consider reporting errors on bounded type variables by incompatible types but with other lower constraints - if ( - variableWithConstraints.constraints.none { it.kind.isLower() } - && upperTypes.computeEmptyIntersectionTypeKind().isDefinitelyEmpty() - ) { + if (upperTypes.size <= 1 || variableWithConstraints.constraints.any { it.kind.isLower() }) + continue + + if (upperTypes.computeEmptyIntersectionTypeKind().isDefinitelyEmpty()) { sink.yieldDiagnostic( @Suppress("UNCHECKED_CAST") InferredEmptyIntersectionDiagnostic( diff --git a/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/model/ConstraintPositionAndErrors.kt b/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/model/ConstraintPositionAndErrors.kt index 4dade3583b1..b0310bf6ccc 100644 --- a/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/model/ConstraintPositionAndErrors.kt +++ b/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/model/ConstraintPositionAndErrors.kt @@ -152,7 +152,8 @@ class InferredEmptyIntersectionError( class OnlyInputTypesDiagnostic(val typeVariable: TypeVariableMarker) : ConstraintSystemError(INAPPLICABLE) -object LowerPriorityToPreserveCompatibility : ConstraintSystemError(RESOLVED_NEED_PRESERVE_COMPATIBILITY) +class LowerPriorityToPreserveCompatibility(val needToReportWarning: Boolean) : + ConstraintSystemError(RESOLVED_NEED_PRESERVE_COMPATIBILITY) fun Constraint.isExpectedTypePosition() = position.from is ExpectedTypeConstraintPosition<*> || position.from is DelegatedPropertyConstraintPosition<*> diff --git a/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/model/NewConstraintSystemImpl.kt b/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/model/NewConstraintSystemImpl.kt index 9db294bf6fc..eb57f3fdd62 100644 --- a/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/model/NewConstraintSystemImpl.kt +++ b/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/model/NewConstraintSystemImpl.kt @@ -450,9 +450,13 @@ class NewConstraintSystemImpl( languageVersionSettings.supportsFeature(LanguageFeature.ForbidInferringTypeVariablesIntoEmptyIntersection) val upperTypes = intersectionTypeConstructor.supertypes() + // Diagnostic with these incompatible types has already been reported at the resolution stage + if (upperTypes.size <= 1 || storage.errors.any { it is InferredEmptyIntersection && it.incompatibleTypes == upperTypes }) + return + if (upperTypes.computeEmptyIntersectionTypeKind().isDefinitelyEmpty()) { // Remove existing errors from resolution stage because a completion error is more precise - storage.errors.removeIf { it is InferredEmptyIntersectionError || it is InferredEmptyIntersectionWarning } + storage.errors.removeIf { it is InferredEmptyIntersection } val errorFactory = if (isInferredEmptyIntersectionForbidden) ::InferredEmptyIntersectionError else ::InferredEmptyIntersectionWarning addError(errorFactory(upperTypes, variable)) diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ResolutionParts.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ResolutionParts.kt index b8bd894678a..0e01f41f3f3 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ResolutionParts.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ResolutionParts.kt @@ -892,18 +892,23 @@ internal object CheckIncompatibleTypeVariableUpperBounds : ResolutionPart() { for (variableWithConstraints in getSystem().getBuilder().currentStorage().notFixedTypeVariables.values) { val upperTypes = variableWithConstraints.constraints.extractUpperTypesToCheckIntersectionEmptiness() - // TODO: consider reporting errors on bounded type variables by incompatible types but with other lower constraints - if ( - variableWithConstraints.constraints.none { it.kind.isLower() } - && upperTypes.computeEmptyIntersectionTypeKind().isDefinitelyEmpty() - ) { - val isInferredEmptyIntersectionForbidden = - callComponents.languageVersionSettings.supportsFeature(LanguageFeature.ForbidInferringTypeVariablesIntoEmptyIntersection) + when { + // TODO: consider reporting errors on bounded type variables by incompatible types but with other lower constraints + upperTypes.size <= 1 || variableWithConstraints.constraints.any { it.kind.isLower() } -> + continue + wasPreviouslyDiscriminated(upperTypes) -> { + markCandidateForCompatibilityResolve(needToReportWarning = false) + continue + } + upperTypes.computeEmptyIntersectionTypeKind().isDefinitelyEmpty() -> { + val isInferredEmptyIntersectionForbidden = + callComponents.languageVersionSettings.supportsFeature(LanguageFeature.ForbidInferringTypeVariablesIntoEmptyIntersection) - val errorFactory = if (isInferredEmptyIntersectionForbidden || wasPreviouslyDiscriminated(upperTypes)) - ::InferredEmptyIntersectionError - else ::InferredEmptyIntersectionWarning - addError(errorFactory(upperTypes, variableWithConstraints.typeVariable)) + val errorFactory = if (isInferredEmptyIntersectionForbidden) + ::InferredEmptyIntersectionError + else ::InferredEmptyIntersectionWarning + addError(errorFactory(upperTypes, variableWithConstraints.typeVariable)) + } } } } diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/model/ResolvedCallAtoms.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/model/ResolvedCallAtoms.kt index 159f3c38a05..404736c101e 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/model/ResolvedCallAtoms.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/model/ResolvedCallAtoms.kt @@ -160,12 +160,15 @@ open class MutableResolvedCallAtom( override fun toString(): String = "$atom, candidate = $candidateDescriptor" } -fun ResolutionCandidate.markCandidateForCompatibilityResolve() { +fun ResolutionCandidate.markCandidateForCompatibilityResolve(needToReportWarning: Boolean = true) { if (callComponents.languageVersionSettings.supportsFeature(LanguageFeature.DisableCompatibilityModeForNewInference)) return - addDiagnostic(LowerPriorityToPreserveCompatibility.asDiagnostic()) + addDiagnostic(LowerPriorityToPreserveCompatibility(needToReportWarning).asDiagnostic()) } -fun CallableReferencesCandidateFactory.markCandidateForCompatibilityResolve(diagnostics: SmartList) { +fun CallableReferencesCandidateFactory.markCandidateForCompatibilityResolve( + diagnostics: SmartList, + needToReportWarning: Boolean = true, +) { if (callComponents.languageVersionSettings.supportsFeature(LanguageFeature.DisableCompatibilityModeForNewInference)) return - diagnostics.add(LowerPriorityToPreserveCompatibility.asDiagnostic()) + diagnostics.add(LowerPriorityToPreserveCompatibility(needToReportWarning).asDiagnostic()) } diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/tower/TowerResolver.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/tower/TowerResolver.kt index 17922c544d8..c3b97da202c 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/tower/TowerResolver.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/tower/TowerResolver.kt @@ -18,6 +18,9 @@ package org.jetbrains.kotlin.resolve.calls.tower import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.progress.ProgressIndicatorAndCompilationCanceledStatus +import org.jetbrains.kotlin.resolve.calls.components.candidate.ResolutionCandidate +import org.jetbrains.kotlin.resolve.calls.inference.model.LowerPriorityToPreserveCompatibility +import org.jetbrains.kotlin.resolve.calls.model.constraintSystemError import org.jetbrains.kotlin.resolve.calls.tasks.ExplicitReceiverKind import org.jetbrains.kotlin.resolve.descriptorUtil.HIDES_MEMBERS_NAME_LIST import org.jetbrains.kotlin.resolve.scopes.HierarchicalScope @@ -437,13 +440,21 @@ class TowerResolver { } if (firstGroupWithResolved == null) return null - if (compatibilityCandidate != null && compatibilityGroup !== firstGroupWithResolved) { + if (compatibilityCandidate != null + && compatibilityGroup !== firstGroupWithResolved + && needToReportCompatibilityWarning(compatibilityCandidate) + ) { firstGroupWithResolved.forEach { it.addCompatibilityWarning(compatibilityCandidate) } } return firstGroupWithResolved.filter(::isSuccessfulCandidate) } + private fun needToReportCompatibilityWarning(candidate: C) = candidate is ResolutionCandidate && + candidate.diagnostics.any { + (it.constraintSystemError as? LowerPriorityToPreserveCompatibility)?.needToReportWarning == true + } + private fun isSuccessfulCandidate(candidate: C): Boolean { return candidate.resultingApplicability == CandidateApplicability.RESOLVED || candidate.resultingApplicability == CandidateApplicability.RESOLVED_WITH_ERROR diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52393.fir.kt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52393.fir.kt new file mode 100644 index 00000000000..a13efaa4aed --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52393.fir.kt @@ -0,0 +1,17 @@ +class Wrapper + +class WrapperFunctions { + infix fun , S : T?> Wrapper.greaterEq(t: T): Unit = Unit + + infix fun , S : T?> Wrapper.greaterEq(other: Wrapper): Unit = Unit // if this function is removed, it also works +} + +fun main() { + val wrapper = Wrapper() + val number: Int = 5 // doesn't work +// val number: Long = 5 // works + + with (WrapperFunctions()) { + wrapper greaterEq number + } +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52393.kt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52393.kt new file mode 100644 index 00000000000..6980ed30a68 --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52393.kt @@ -0,0 +1,17 @@ +class Wrapper + +class WrapperFunctions { + infix fun , S : T?> Wrapper.greaterEq(t: T): Unit = Unit + + infix fun , S : T?> Wrapper.greaterEq(other: Wrapper): Unit = Unit // if this function is removed, it also works +} + +fun main() { + val wrapper = Wrapper() + val number: Int = 5 // doesn't work +// val number: Long = 5 // works + + with (WrapperFunctions()) { + wrapper greaterEq number + } +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52393.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52393.txt new file mode 100644 index 00000000000..de74a8840ed --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52393.txt @@ -0,0 +1,19 @@ +package + +public fun main(): kotlin.Unit + +public final class Wrapper { + public constructor Wrapper() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final class WrapperFunctions { + public constructor WrapperFunctions() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + public final infix fun , /*1*/ S : T?> Wrapper.greaterEq(/*0*/ t: T): kotlin.Unit + public final infix fun , /*1*/ S : T?> Wrapper.greaterEq(/*0*/ other: Wrapper): kotlin.Unit +} diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52431.fir.kt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52431.fir.kt new file mode 100644 index 00000000000..597de5e3a64 --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52431.fir.kt @@ -0,0 +1,13 @@ +interface Expression + +interface ExpressionWithColumnType : Expression + +class Column: ExpressionWithColumnType + +infix fun , S : T?> ExpressionWithColumnType.less(t: T) {} + +infix fun , S : T?> Expression.less(other: Expression) {} + +fun main(x: Column, y: Double) { + x less y // error in 1.7.20, no error in 1.7.0 +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52431.kt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52431.kt new file mode 100644 index 00000000000..99e05da1c82 --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52431.kt @@ -0,0 +1,13 @@ +interface Expression + +interface ExpressionWithColumnType : Expression + +class Column: ExpressionWithColumnType + +infix fun , S : T?> ExpressionWithColumnType.less(t: T) {} + +infix fun , S : T?> Expression.less(other: Expression) {} + +fun main(x: Column, y: Double) { + x less y // error in 1.7.20, no error in 1.7.0 +} diff --git a/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52431.txt b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52431.txt new file mode 100644 index 00000000000..de2b93b63c8 --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52431.txt @@ -0,0 +1,24 @@ +package + +public fun main(/*0*/ x: Column, /*1*/ y: kotlin.Double): kotlin.Unit +public infix fun , /*1*/ S : T?> Expression.less(/*0*/ other: Expression): kotlin.Unit +public infix fun , /*1*/ S : T?> ExpressionWithColumnType.less(/*0*/ t: T): kotlin.Unit + +public final class Column : ExpressionWithColumnType { + public constructor Column() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public interface Expression { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public interface ExpressionWithColumnType : Expression { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/greater.kt b/compiler/testData/diagnostics/testsWithStdLib/greater.kt index 905c2dbd495..a5e1b0a7e61 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/greater.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/greater.kt @@ -8,5 +8,5 @@ fun , S : T?> Expression.greater(other: T): GreaterOp = fun foo(countExpr: Expression) { countExpr.greater(0) countExpr.greater("0") - countExpr.greater("0") + countExpr.greater("0") } diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java index 79956207e1e..bc7ffcb2741 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java @@ -15599,6 +15599,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52364.kt"); } + @Test + @TestMetadata("kt52393.kt") + public void testKt52393() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52393.kt"); + } + + @Test + @TestMetadata("kt52431.kt") + public void testKt52431() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt52431.kt"); + } + @Test @TestMetadata("nullableEmptyIntersection.kt") public void testNullableEmptyIntersection() throws Exception {