JS: more default arguments fixes (KT-24413, KT-21968 fixed)

MPP-related:
* inherited from interfaces
* inherited body from interface
* default arguments in an interface, implemented by a class delegate
* super call of a method with default argument

Also:
* inheritance from an interface and another interface descendant (KT-21968)
* inheritance through an intermediate interface
This commit is contained in:
Anton Bannykh
2018-05-15 14:55:59 +03:00
parent da7b59984f
commit 03e46ce0ca
21 changed files with 357 additions and 55 deletions
@@ -8300,6 +8300,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/function"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("complexInheritance.kt")
public void testComplexInheritance() throws Exception {
runTest("compiler/testData/codegen/box/defaultArguments/function/complexInheritance.kt");
}
@TestMetadata("covariantOverride.kt")
public void testCovariantOverride() throws Exception {
runTest("compiler/testData/codegen/box/defaultArguments/function/covariantOverride.kt");
@@ -8350,6 +8355,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/defaultArguments/function/funInTrait.kt");
}
@TestMetadata("funInTraitChain.kt")
public void testFunInTraitChain() throws Exception {
runTest("compiler/testData/codegen/box/defaultArguments/function/funInTraitChain.kt");
}
@TestMetadata("innerExtentionFunction.kt")
public void testInnerExtentionFunction() throws Exception {
runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunction.kt");
@@ -13472,6 +13482,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/constructor.kt");
}
@TestMetadata("delegatedExpectedInterface.kt")
public void testDelegatedExpectedInterface() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/delegatedExpectedInterface.kt");
}
@TestMetadata("function.kt")
public void testFunction() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt");
@@ -13487,6 +13502,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedClass.kt");
}
@TestMetadata("inheritedFromExpectedInterface.kt")
public void testInheritedFromExpectedInterface() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedInterface.kt");
}
@TestMetadata("inheritedFromExpectedMethod.kt")
public void testInheritedFromExpectedMethod() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedMethod.kt");
@@ -13497,6 +13517,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedInExpectedDeclarations.kt");
}
@TestMetadata("inheritedViaAnotherInterfaceIndirectly.kt")
public void testInheritedViaAnotherInterfaceIndirectly() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedViaAnotherInterfaceIndirectly.kt");
}
@TestMetadata("inlineFunctionWithDefaultLambda.kt")
public void testInlineFunctionWithDefaultLambda() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inlineFunctionWithDefaultLambda.kt");
@@ -13511,6 +13536,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
public void testKt23239() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/kt23239.kt");
}
@TestMetadata("superCall.kt")
public void testSuperCall() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/superCall.kt");
}
}
}