[NI] Discard DefNotNull types inside invariant positions

#KT-30297 Fixed
 #KT-32168 Fixed
 #KT-27722 Fixed (actually, it was fixed with addition of DefNotNullTypes, and now test was added to save this behavior)
 #KT-32345 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-10-31 14:51:30 +03:00
parent 4fc1bd9ec5
commit 5582fd4056
16 changed files with 251 additions and 10 deletions
@@ -10321,6 +10321,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
runTest("compiler/testData/diagnostics/tests/inference/constraints/constraintOnFunctionLiteral.kt");
}
@TestMetadata("definitelyNotNullTypeInvariantPosition.kt")
public void testDefinitelyNotNullTypeInvariantPosition() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInvariantPosition.kt");
}
@TestMetadata("earlyCompletionForCalls.kt")
public void testEarlyCompletionForCalls() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/constraints/earlyCompletionForCalls.kt");
@@ -10405,6 +10410,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
public void testSupertypeConstraintOnNullableType() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/constraints/supertypeConstraintOnNullableType.kt");
}
@TestMetadata("wrongApproximationWithDefNotNullTypesAndDelegates.kt")
public void testWrongApproximationWithDefNotNullTypesAndDelegates() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/constraints/wrongApproximationWithDefNotNullTypesAndDelegates.kt");
}
}
@TestMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls")
@@ -2731,11 +2731,21 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt1558.kt");
}
@TestMetadata("kt27772.kt")
public void testKt27772() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt27772.kt");
}
@TestMetadata("kt30292.kt")
public void testKt30292() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt30292.kt");
}
@TestMetadata("kt32345.kt")
public void testKt32345() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt32345.kt");
}
@TestMetadata("kt3458.kt")
public void testKt3458() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt3458.kt");
@@ -2731,11 +2731,21 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt1558.kt");
}
@TestMetadata("kt27772.kt")
public void testKt27772() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt27772.kt");
}
@TestMetadata("kt30292.kt")
public void testKt30292() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt30292.kt");
}
@TestMetadata("kt32345.kt")
public void testKt32345() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt32345.kt");
}
@TestMetadata("kt3458.kt")
public void testKt3458() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt3458.kt");
@@ -10316,6 +10316,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
runTest("compiler/testData/diagnostics/tests/inference/constraints/constraintOnFunctionLiteral.kt");
}
@TestMetadata("definitelyNotNullTypeInvariantPosition.kt")
public void testDefinitelyNotNullTypeInvariantPosition() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInvariantPosition.kt");
}
@TestMetadata("earlyCompletionForCalls.kt")
public void testEarlyCompletionForCalls() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/constraints/earlyCompletionForCalls.kt");
@@ -10400,6 +10405,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
public void testSupertypeConstraintOnNullableType() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/constraints/supertypeConstraintOnNullableType.kt");
}
@TestMetadata("wrongApproximationWithDefNotNullTypesAndDelegates.kt")
public void testWrongApproximationWithDefNotNullTypesAndDelegates() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/constraints/wrongApproximationWithDefNotNullTypesAndDelegates.kt");
}
}
@TestMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls")