[K/N, Tests] Add diagnostic tests for SUPER_CALL_WITH_DEFAULT_PARAMETERS
^KT-61572 Merge-request: KT-MR-11941 Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
f07028959d
commit
bab00255dc
+6
@@ -325,6 +325,12 @@ public class FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated extends Abst
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/smartcastOnMemberPropertyFromCommonClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallDefaultArguments.kt")
|
||||
public void testSuperCallDefaultArguments() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/superCallDefaultArguments.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("supertypeActualizationWithAny.kt")
|
||||
public void testSupertypeActualizationWithAny() throws Exception {
|
||||
|
||||
+6
@@ -325,6 +325,12 @@ public class FirOldFrontendMPPDiagnosticsWithPsiTestGenerated extends AbstractFi
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/smartcastOnMemberPropertyFromCommonClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallDefaultArguments.kt")
|
||||
public void testSuperCallDefaultArguments() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/superCallDefaultArguments.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("supertypeActualizationWithAny.kt")
|
||||
public void testSupertypeActualizationWithAny() throws Exception {
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// KT-61572: SUPER_CALL_WITH_DEFAULT_PARAMETERS must be raised for K2/Native in fun bar1()
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
package foo
|
||||
expect open class A {
|
||||
open fun foo(x: Int = 20, y: Int = 3): Int
|
||||
}
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
package foo
|
||||
actual open class A {
|
||||
actual open fun foo(x: Int, y: Int) = x + y
|
||||
}
|
||||
|
||||
open class B : A() {
|
||||
override fun foo(x: Int, y: Int) = 0
|
||||
|
||||
fun bar1() = super.foo()
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// KT-61572: SUPER_CALL_WITH_DEFAULT_PARAMETERS must be raised for K2/Native in fun bar1()
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
package foo
|
||||
expect open class A {
|
||||
open fun foo(x: Int = 20, y: Int = 3): Int
|
||||
}
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
package foo
|
||||
actual open class A {
|
||||
actual open fun foo(x: Int, y: Int) = x + y
|
||||
}
|
||||
|
||||
open class B : A() {
|
||||
override fun foo(x: Int, y: Int) = 0
|
||||
|
||||
fun bar1() = super.<!SUPER_CALL_WITH_DEFAULT_PARAMETERS!>foo<!>()
|
||||
}
|
||||
Generated
+6
@@ -23320,6 +23320,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/smartcastOnMemberPropertyFromCommonClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("superCallDefaultArguments.kt")
|
||||
public void testSuperCallDefaultArguments() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/superCallDefaultArguments.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("supertypeActualizationWithAny.kt")
|
||||
public void testSupertypeActualizationWithAny() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user