NI: Prefer nullable lower bound to flexible one when substitution of type variable is performed and remember flexibility of type parameters based on flexibility of its upper bounds
^KT-32435 Fixed
This commit is contained in:
@@ -8099,6 +8099,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/functionLiterals/LabeledFunctionLiterals.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaInLambda2.kt")
|
||||
public void testLambdaInLambda2() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/functionLiterals/lambdaInLambda2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("prematurelyAnalyzingLambdaWhileFixingTypeVariableForAnotherArgument.kt")
|
||||
public void testPrematurelyAnalyzingLambdaWhileFixingTypeVariableForAnotherArgument() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/functionLiterals/prematurelyAnalyzingLambdaWhileFixingTypeVariableForAnotherArgument.kt");
|
||||
@@ -14900,6 +14905,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/nullableTypes/elvisOnUnit.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inferenceFlexibleTToNullable.kt")
|
||||
public void testInferenceFlexibleTToNullable() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/nullableTypes/inferenceFlexibleTToNullable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nullAssertOnTypeWithNullableUpperBound.kt")
|
||||
public void testNullAssertOnTypeWithNullableUpperBound() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/nullableTypes/nullAssertOnTypeWithNullableUpperBound.kt");
|
||||
@@ -14945,6 +14955,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/nullableTypes/safeCallWithInvoke.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("takingNullabilityFromExplicitTypeArgmentsInsteadOfUsingFlexibleTypes.kt")
|
||||
public void testTakingNullabilityFromExplicitTypeArgmentsInsteadOfUsingFlexibleTypes() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/nullableTypes/takingNullabilityFromExplicitTypeArgmentsInsteadOfUsingFlexibleTypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uselessElvis.kt")
|
||||
public void testUselessElvis() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/nullableTypes/uselessElvis.kt");
|
||||
@@ -18930,6 +18945,16 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/samConversions/SAMAfterSubstitutionKT.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("samConversionToGeneric.kt")
|
||||
public void testSamConversionToGeneric() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/samConversions/samConversionToGeneric.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("samConversionsWithSmartCasts.kt")
|
||||
public void testSamConversionsWithSmartCasts() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/samConversions/samConversionsWithSmartCasts.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("sameCandidatesFromKotlinAndJavaInOneScope.kt")
|
||||
public void testSameCandidatesFromKotlinAndJavaInOneScope() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/samConversions/sameCandidatesFromKotlinAndJavaInOneScope.kt");
|
||||
|
||||
Generated
+25
@@ -8094,6 +8094,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/functionLiterals/LabeledFunctionLiterals.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaInLambda2.kt")
|
||||
public void testLambdaInLambda2() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/functionLiterals/lambdaInLambda2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("prematurelyAnalyzingLambdaWhileFixingTypeVariableForAnotherArgument.kt")
|
||||
public void testPrematurelyAnalyzingLambdaWhileFixingTypeVariableForAnotherArgument() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/functionLiterals/prematurelyAnalyzingLambdaWhileFixingTypeVariableForAnotherArgument.kt");
|
||||
@@ -14895,6 +14900,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/nullableTypes/elvisOnUnit.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inferenceFlexibleTToNullable.kt")
|
||||
public void testInferenceFlexibleTToNullable() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/nullableTypes/inferenceFlexibleTToNullable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nullAssertOnTypeWithNullableUpperBound.kt")
|
||||
public void testNullAssertOnTypeWithNullableUpperBound() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/nullableTypes/nullAssertOnTypeWithNullableUpperBound.kt");
|
||||
@@ -14940,6 +14950,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/nullableTypes/safeCallWithInvoke.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("takingNullabilityFromExplicitTypeArgmentsInsteadOfUsingFlexibleTypes.kt")
|
||||
public void testTakingNullabilityFromExplicitTypeArgmentsInsteadOfUsingFlexibleTypes() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/nullableTypes/takingNullabilityFromExplicitTypeArgmentsInsteadOfUsingFlexibleTypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uselessElvis.kt")
|
||||
public void testUselessElvis() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/nullableTypes/uselessElvis.kt");
|
||||
@@ -18920,6 +18935,16 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/samConversions/SAMAfterSubstitutionKT.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("samConversionToGeneric.kt")
|
||||
public void testSamConversionToGeneric() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/samConversions/samConversionToGeneric.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("samConversionsWithSmartCasts.kt")
|
||||
public void testSamConversionsWithSmartCasts() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/samConversions/samConversionsWithSmartCasts.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("sameCandidatesFromKotlinAndJavaInOneScope.kt")
|
||||
public void testSameCandidatesFromKotlinAndJavaInOneScope() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/samConversions/sameCandidatesFromKotlinAndJavaInOneScope.kt");
|
||||
|
||||
+5
@@ -18541,6 +18541,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/platformTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inferenceFlexibleTToNullable.kt")
|
||||
public void testInferenceFlexibleTToNullable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/platformTypes/inferenceFlexibleTToNullable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unsafeNullCheck.kt")
|
||||
public void testUnsafeNullCheck() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/platformTypes/unsafeNullCheck.kt");
|
||||
|
||||
+5
@@ -18541,6 +18541,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/platformTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inferenceFlexibleTToNullable.kt")
|
||||
public void testInferenceFlexibleTToNullable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/platformTypes/inferenceFlexibleTToNullable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unsafeNullCheck.kt")
|
||||
public void testUnsafeNullCheck() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/platformTypes/unsafeNullCheck.kt");
|
||||
|
||||
+5
@@ -17025,6 +17025,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/platformTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inferenceFlexibleTToNullable.kt")
|
||||
public void testInferenceFlexibleTToNullable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/platformTypes/inferenceFlexibleTToNullable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unsafeNullCheck.kt")
|
||||
public void testUnsafeNullCheck() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/platformTypes/unsafeNullCheck.kt");
|
||||
|
||||
+5
@@ -17025,6 +17025,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/platformTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inferenceFlexibleTToNullable.kt")
|
||||
public void testInferenceFlexibleTToNullable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/platformTypes/inferenceFlexibleTToNullable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unsafeNullCheck.kt")
|
||||
public void testUnsafeNullCheck() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/platformTypes/unsafeNullCheck.kt");
|
||||
|
||||
Reference in New Issue
Block a user