K2: Fix processing inference lower bound NullableType <: T & Any
Previously, it was led to plainly adding NullableType <: T constraint which silently led to successful call completion. What is suggested is just marking such initial constraint as unsuccessful. In K1, the error was reported just via additional type checking mechanism being run after call completion. ^KT-58665 Fixed
This commit is contained in:
committed by
Space Team
parent
7bc04e2c33
commit
0d070f8ba9
+12
@@ -15156,6 +15156,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/inference/nothingVsParameterBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullableArgumentForDnn.kt")
|
||||
public void testNullableArgumentForDnn() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/nullableArgumentForDnn.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullableTypeArgumentWithNotNullUpperBound.kt")
|
||||
public void testNullableTypeArgumentWithNotNullUpperBound() throws Exception {
|
||||
@@ -19934,6 +19940,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/mutableIterator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullForOptionalOf.kt")
|
||||
public void testNullForOptionalOf() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/nullForOptionalOf.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullForOptionalOrElse.kt")
|
||||
public void testNullForOptionalOrElse() throws Exception {
|
||||
|
||||
+12
@@ -15156,6 +15156,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/inference/nothingVsParameterBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullableArgumentForDnn.kt")
|
||||
public void testNullableArgumentForDnn() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/nullableArgumentForDnn.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullableTypeArgumentWithNotNullUpperBound.kt")
|
||||
public void testNullableTypeArgumentWithNotNullUpperBound() throws Exception {
|
||||
@@ -19934,6 +19940,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/mutableIterator.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullForOptionalOf.kt")
|
||||
public void testNullForOptionalOf() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/nullForOptionalOf.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nullForOptionalOrElse.kt")
|
||||
public void testNullForOptionalOrElse() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user