[K/JS] Move global interface id state into an object to prevent interface ids reinitialization ^Fixed KT-55758
This commit is contained in:
@@ -3889,6 +3889,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/expression/typeCheck/complexIsInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt55758.kt")
|
||||
public void testKt55758() throws Exception {
|
||||
runTest("js/js.translator/testData/box/expression/typeCheck/kt55758.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleAsClass.kt")
|
||||
public void testSimpleAsClass() throws Exception {
|
||||
|
||||
+6
@@ -4505,6 +4505,12 @@ public class FirJsBoxTestGenerated extends AbstractFirJsBoxTest {
|
||||
runTest("js/js.translator/testData/box/expression/typeCheck/complexIsInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt55758.kt")
|
||||
public void testKt55758() throws Exception {
|
||||
runTest("js/js.translator/testData/box/expression/typeCheck/kt55758.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleAsClass.kt")
|
||||
public void testSimpleAsClass() throws Exception {
|
||||
|
||||
+6
@@ -4505,6 +4505,12 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/expression/typeCheck/complexIsInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt55758.kt")
|
||||
public void testKt55758() throws Exception {
|
||||
runTest("js/js.translator/testData/box/expression/typeCheck/kt55758.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleAsClass.kt")
|
||||
public void testSimpleAsClass() throws Exception {
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// EXPECTED_REACHABLE_NODES: 1403
|
||||
// MODULE_KIND: COMMON_JS
|
||||
|
||||
package foo
|
||||
|
||||
@JsExport
|
||||
interface Foo
|
||||
|
||||
class Bar: Foo
|
||||
|
||||
fun box(): String {
|
||||
val foo : Foo = Bar()
|
||||
|
||||
if(foo is Collection<*>) {
|
||||
return "Fail: Foo is a Collection!"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user