[FIR JS] Add more tests for JS_NAME_CLASH diagnostic

^KT-61862 Related
This commit is contained in:
Alexander Korepanov
2023-09-12 14:20:35 +02:00
committed by Space Team
parent 98fdaeb9a7
commit f07028959d
7 changed files with 125 additions and 0 deletions
@@ -8352,6 +8352,12 @@ public class FirJsBoxTestGenerated extends AbstractFirJsBoxTest {
runTest("js/js.translator/testData/box/nameClashes/overloadMethodsWithSameParameterTypeName.kt");
}
@Test
@TestMetadata("promiseThen.kt")
public void testPromiseThen() throws Exception {
runTest("js/js.translator/testData/box/nameClashes/promiseThen.kt");
}
@Test
@TestMetadata("propertyAndNativeMethod.kt")
public void testPropertyAndNativeMethod() throws Exception {
@@ -8458,6 +8458,12 @@ public class FirJsES6BoxTestGenerated extends AbstractFirJsES6BoxTest {
runTest("js/js.translator/testData/box/nameClashes/overloadMethodsWithSameParameterTypeName.kt");
}
@Test
@TestMetadata("promiseThen.kt")
public void testPromiseThen() throws Exception {
runTest("js/js.translator/testData/box/nameClashes/promiseThen.kt");
}
@Test
@TestMetadata("propertyAndNativeMethod.kt")
public void testPropertyAndNativeMethod() throws Exception {
@@ -8458,6 +8458,12 @@ public class IrBoxJsES6TestGenerated extends AbstractIrBoxJsES6Test {
runTest("js/js.translator/testData/box/nameClashes/overloadMethodsWithSameParameterTypeName.kt");
}
@Test
@TestMetadata("promiseThen.kt")
public void testPromiseThen() throws Exception {
runTest("js/js.translator/testData/box/nameClashes/promiseThen.kt");
}
@Test
@TestMetadata("propertyAndNativeMethod.kt")
public void testPropertyAndNativeMethod() throws Exception {
@@ -8352,6 +8352,12 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
runTest("js/js.translator/testData/box/nameClashes/overloadMethodsWithSameParameterTypeName.kt");
}
@Test
@TestMetadata("promiseThen.kt")
public void testPromiseThen() throws Exception {
runTest("js/js.translator/testData/box/nameClashes/promiseThen.kt");
}
@Test
@TestMetadata("propertyAndNativeMethod.kt")
public void testPropertyAndNativeMethod() throws Exception {
@@ -0,0 +1,6 @@
// KJS_WITH_FULL_RUNTIME
import kotlin.js.Promise
public class MyPromise(executor: ((Unit) -> Unit, (Throwable) -> Unit) -> Unit) : Promise<Unit>(executor)
fun box() = "OK"