NI: Fix smart-cast related regression

See the test and the issue for the clarification
After the change 7898922066
the expected type for "a" in expression "foo(a)" is A<E & B<*>>
But we have the original type A<E> and smart-casted enriched type A<B<*>>
(non of them is a subtype of A<E & B<*>>)
and fail in checkTypeInternal when checking types in during completion

^KT-35844 Fixed
This commit is contained in:
Denis Zharkov
2020-01-10 18:20:44 +03:00
parent 02d9f258d1
commit 7255ee0a5b
6 changed files with 62 additions and 1 deletions
@@ -11094,6 +11094,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3559.kt");
}
@TestMetadata("kt35844.kt")
public void testKt35844() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/regressions/kt35844.kt");
}
@TestMetadata("kt4420.kt")
public void testKt4420() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/regressions/kt4420.kt");
@@ -11089,6 +11089,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3559.kt");
}
@TestMetadata("kt35844.kt")
public void testKt35844() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/regressions/kt35844.kt");
}
@TestMetadata("kt4420.kt")
public void testKt4420() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/regressions/kt4420.kt");