Don't report incompatibility expect/actual errors on usual overloads

Divide incompatibility on two groups: strong and weak. Strong incompatibility means that if declaration with such incompatibility has no `actual` modifier then it's considered as usual overload and we'll not report any error on it.

 #KT-20540 Fixed
 #KT-20680 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2017-10-11 19:28:53 +03:00
parent eb828e3497
commit d0cbd73307
13 changed files with 258 additions and 10 deletions
@@ -14127,6 +14127,18 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("expectDeclarationWithStrongIncompatibilities.kt")
public void testExpectDeclarationWithStrongIncompatibilities() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectDeclarationWithStrongIncompatibilities.kt");
doTest(fileName);
}
@TestMetadata("expectDeclarationWithWeakIncompatibilities.kt")
public void testExpectDeclarationWithWeakIncompatibilities() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectDeclarationWithWeakIncompatibilities.kt");
doTest(fileName);
}
@TestMetadata("explicitConstructorDelegation.kt")
public void testExplicitConstructorDelegation() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/explicitConstructorDelegation.kt");
@@ -14127,6 +14127,18 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
doTest(fileName);
}
@TestMetadata("expectDeclarationWithStrongIncompatibilities.kt")
public void testExpectDeclarationWithStrongIncompatibilities() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectDeclarationWithStrongIncompatibilities.kt");
doTest(fileName);
}
@TestMetadata("expectDeclarationWithWeakIncompatibilities.kt")
public void testExpectDeclarationWithWeakIncompatibilities() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectDeclarationWithWeakIncompatibilities.kt");
doTest(fileName);
}
@TestMetadata("explicitConstructorDelegation.kt")
public void testExplicitConstructorDelegation() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/explicitConstructorDelegation.kt");