[NI] Fix 'only input type' check for intersection types

Check worked incorrectly in case when argument type and expected type are the
same intersection type, which is possible for local variables without explicit
type declaration.
This commit is contained in:
Pavel Kirpichenkov
2019-11-20 15:22:25 +03:00
parent 57760e5873
commit afd59f0d46
5 changed files with 28 additions and 5 deletions
@@ -2716,6 +2716,11 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/integerLiterals.kt");
}
@TestMetadata("intersectionInputType.kt")
public void testIntersectionInputType() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/intersectionInputType.kt");
}
@TestMetadata("kt11266.kt")
public void testKt11266() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt11266.kt");
@@ -2716,6 +2716,11 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/integerLiterals.kt");
}
@TestMetadata("intersectionInputType.kt")
public void testIntersectionInputType() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/intersectionInputType.kt");
}
@TestMetadata("kt11266.kt")
public void testKt11266() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt11266.kt");