[JS IR] Add case with bridge for method with default parameters
This commit is contained in:
committed by
Space Team
parent
23144b92d8
commit
372a512c91
+6
@@ -2369,6 +2369,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/bridges/nestedClassTypeParameters.kt");
|
runTest("compiler/testData/codegen/box/bridges/nestedClassTypeParameters.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("methodWithDefaultParameter.kt")
|
||||||
|
public void testMethodWithDefaultParameter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/bridges/methodWithDefaultParameter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("noBridgeOnMutableCollectionInheritance.kt")
|
@TestMetadata("noBridgeOnMutableCollectionInheritance.kt")
|
||||||
public void testNoBridgeOnMutableCollectionInheritance() throws Exception {
|
public void testNoBridgeOnMutableCollectionInheritance() throws Exception {
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
interface A {
|
||||||
|
fun foo(foo: Any? = null): Boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
interface B {
|
||||||
|
fun foo(foo: Any? = null): Boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
open class B2 : B {
|
||||||
|
override fun foo(foo: Any?): Boolean {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
open class C : B2(), A {
|
||||||
|
final override fun foo(foo: Any?): Boolean {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val a: A = C()
|
||||||
|
return if (a.foo()) "OK" else "fail"
|
||||||
|
}
|
||||||
+6
@@ -2273,6 +2273,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/bridges/nestedClassTypeParameters.kt");
|
runTest("compiler/testData/codegen/box/bridges/nestedClassTypeParameters.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("methodWithDefaultParameter.kt")
|
||||||
|
public void testMethodWithDefaultParameter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/bridges/methodWithDefaultParameter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("noBridgeOnMutableCollectionInheritance.kt")
|
@TestMetadata("noBridgeOnMutableCollectionInheritance.kt")
|
||||||
public void testNoBridgeOnMutableCollectionInheritance() throws Exception {
|
public void testNoBridgeOnMutableCollectionInheritance() throws Exception {
|
||||||
|
|||||||
+6
@@ -2369,6 +2369,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/bridges/nestedClassTypeParameters.kt");
|
runTest("compiler/testData/codegen/box/bridges/nestedClassTypeParameters.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("methodWithDefaultParameter.kt")
|
||||||
|
public void testMethodWithDefaultParameter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/bridges/methodWithDefaultParameter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("noBridgeOnMutableCollectionInheritance.kt")
|
@TestMetadata("noBridgeOnMutableCollectionInheritance.kt")
|
||||||
public void testNoBridgeOnMutableCollectionInheritance() throws Exception {
|
public void testNoBridgeOnMutableCollectionInheritance() throws Exception {
|
||||||
|
|||||||
+5
@@ -1992,6 +1992,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/bridges/nestedClassTypeParameters.kt");
|
runTest("compiler/testData/codegen/box/bridges/nestedClassTypeParameters.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("methodWithDefaultParameter.kt")
|
||||||
|
public void testMethodWithDefaultParameter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/bridges/methodWithDefaultParameter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("noBridgeOnMutableCollectionInheritance.kt")
|
@TestMetadata("noBridgeOnMutableCollectionInheritance.kt")
|
||||||
public void testNoBridgeOnMutableCollectionInheritance() throws Exception {
|
public void testNoBridgeOnMutableCollectionInheritance() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt");
|
runTest("compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt");
|
||||||
|
|||||||
+6
@@ -1547,6 +1547,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/bridges/nestedClassTypeParameters.kt");
|
runTest("compiler/testData/codegen/box/bridges/nestedClassTypeParameters.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("methodWithDefaultParameter.kt")
|
||||||
|
public void testMethodWithDefaultParameter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/bridges/methodWithDefaultParameter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("noBridgeOnMutableCollectionInheritance.kt")
|
@TestMetadata("noBridgeOnMutableCollectionInheritance.kt")
|
||||||
public void testNoBridgeOnMutableCollectionInheritance() throws Exception {
|
public void testNoBridgeOnMutableCollectionInheritance() throws Exception {
|
||||||
|
|||||||
+6
@@ -1601,6 +1601,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/bridges/nestedClassTypeParameters.kt");
|
runTest("compiler/testData/codegen/box/bridges/nestedClassTypeParameters.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("methodWithDefaultParameter.kt")
|
||||||
|
public void testMethodWithDefaultParameter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/bridges/methodWithDefaultParameter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("noBridgeOnMutableCollectionInheritance.kt")
|
@TestMetadata("noBridgeOnMutableCollectionInheritance.kt")
|
||||||
public void testNoBridgeOnMutableCollectionInheritance() throws Exception {
|
public void testNoBridgeOnMutableCollectionInheritance() throws Exception {
|
||||||
|
|||||||
+5
@@ -1422,6 +1422,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
|||||||
runTest("compiler/testData/codegen/box/bridges/nestedClassTypeParameters.kt");
|
runTest("compiler/testData/codegen/box/bridges/nestedClassTypeParameters.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("methodWithDefaultParameter.kt")
|
||||||
|
public void testMethodWithDefaultParameter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/bridges/methodWithDefaultParameter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("noBridgeOnMutableCollectionInheritance.kt")
|
@TestMetadata("noBridgeOnMutableCollectionInheritance.kt")
|
||||||
public void testNoBridgeOnMutableCollectionInheritance() throws Exception {
|
public void testNoBridgeOnMutableCollectionInheritance() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt");
|
runTest("compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt");
|
||||||
|
|||||||
+6
@@ -1639,6 +1639,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
|||||||
runTest("compiler/testData/codegen/box/bridges/nestedClassTypeParameters.kt");
|
runTest("compiler/testData/codegen/box/bridges/nestedClassTypeParameters.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("methodWithDefaultParameter.kt")
|
||||||
|
public void testMethodWithDefaultParameter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/bridges/methodWithDefaultParameter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("noBridgeOnMutableCollectionInheritance.kt")
|
@TestMetadata("noBridgeOnMutableCollectionInheritance.kt")
|
||||||
public void testNoBridgeOnMutableCollectionInheritance() throws Exception {
|
public void testNoBridgeOnMutableCollectionInheritance() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user