[JS FIR] Enable warnings and infos for JS FIR tests

This commit is contained in:
Alexander Korepanov
2023-11-20 14:09:29 +01:00
committed by Space Team
parent 862be5a787
commit b1465fbfb8
23 changed files with 130 additions and 74 deletions
@@ -0,0 +1,14 @@
// FIR_IDENTICAL
// !OPT_IN: kotlin.js.ExperimentalJsExport
// !RENDER_DIAGNOSTICS_MESSAGES
import kotlin.js.JsExport
@JsExport
class ClassA<T : UpperBoundInterface> {
inner class InnerA {
}
}
@JsExport
interface UpperBoundInterface {}
@@ -0,0 +1,22 @@
package
@kotlin.js.JsExport public final class ClassA</*0*/ T : UpperBoundInterface> {
public constructor ClassA</*0*/ T : UpperBoundInterface>()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
public final inner class InnerA /*captured type parameters: /*0*/ T : UpperBoundInterface*/ {
public constructor InnerA()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
@kotlin.js.JsExport public interface UpperBoundInterface {
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -3,25 +3,25 @@
package foo
@JsExport
fun delete() {}
<!NON_CONSUMABLE_EXPORTED_IDENTIFIER("delete")!>@JsExport
fun delete() {}<!>
<!NON_CONSUMABLE_EXPORTED_IDENTIFIER("instanceof")!>@JsExport
val instanceof = 4<!>
<!NON_CONSUMABLE_EXPORTED_IDENTIFIER("eval")!>@JsExport
class eval<!>
@JsExport
val instanceof = 4
@JsExport
class eval
@JsExport
@JsName("await")
@JsName(<!NON_CONSUMABLE_EXPORTED_IDENTIFIER("await")!>"await"<!>)
fun foo() {}
@JsExport
@JsName("this")
@JsName(<!NON_CONSUMABLE_EXPORTED_IDENTIFIER("this")!>"this"<!>)
val bar = 4
@JsExport
@JsName("super")
@JsName(<!NON_CONSUMABLE_EXPORTED_IDENTIFIER("super")!>"super"<!>)
class Baz
@JsExport
@@ -4,19 +4,19 @@
package foo
fun delete() {}
<!NON_CONSUMABLE_EXPORTED_IDENTIFIER("delete")!>fun delete() {}<!>
val instanceof = 4
<!NON_CONSUMABLE_EXPORTED_IDENTIFIER("instanceof")!>val instanceof = 4<!>
class eval
<!NON_CONSUMABLE_EXPORTED_IDENTIFIER("eval")!>class eval<!>
@JsName("await")
@JsName(<!NON_CONSUMABLE_EXPORTED_IDENTIFIER("await")!>"await"<!>)
fun foo() {}
@JsName("this")
@JsName(<!NON_CONSUMABLE_EXPORTED_IDENTIFIER("this")!>"this"<!>)
val bar = 4
@JsName("super")
@JsName(<!NON_CONSUMABLE_EXPORTED_IDENTIFIER("super")!>"super"<!>)
class Baz
class Test {
@@ -7,30 +7,30 @@ package foo
class C
@JsExport
fun foo(x: C) {
fun foo(<!NON_EXPORTABLE_TYPE("parameter; foo.C")!>x: C<!>) {
}
@JsExport
fun bar() = C()
<!NON_EXPORTABLE_TYPE("return; foo.C")!>@JsExport
fun bar()<!> = C()
@JsExport
val x: C = C()
<!NON_EXPORTABLE_TYPE("property; foo.C")!>@JsExport
val x: C<!> = C()
@JsExport
var x2: C
<!NON_EXPORTABLE_TYPE("property; foo.C")!>@JsExport
var x2: C<!>
get() = C()
set(value) { }
@JsExport
class A(
val x: C,
y: C
<!NON_EXPORTABLE_TYPE("parameter; foo.C")!>val x: C<!>,
<!NON_EXPORTABLE_TYPE("parameter; foo.C")!>y: C<!>
) {
fun foo(x: C) = x
<!NON_EXPORTABLE_TYPE("return; foo.C")!>fun foo(<!NON_EXPORTABLE_TYPE("parameter; foo.C")!>x: C<!>)<!> = x
val x2: C = C()
<!NON_EXPORTABLE_TYPE("property; foo.C")!>val x2: C<!> = C()
var x3: C
<!NON_EXPORTABLE_TYPE("property; foo.C")!>var x3: C<!>
get() = C()
set(value) { }
}
@@ -40,7 +40,7 @@ fun foo2() {
}
@JsExport
fun foo3(x: Unit) {
fun foo3(<!NON_EXPORTABLE_TYPE("parameter; kotlin.Unit")!>x: Unit<!>) {
}
@JsExport
@@ -48,7 +48,7 @@ fun foo4(x: () -> Unit) {
}
@JsExport
fun foo5(x: (Unit) -> Unit) {
fun foo5(<!NON_EXPORTABLE_TYPE("parameter; kotlin.Function1<kotlin.Unit, kotlin.Unit>")!>x: (Unit) -> Unit<!>) {
}
@JsExport
@@ -8,17 +8,17 @@ abstract class C
interface I
@JsExport
fun <T : C>foo() { }
fun <T : <!NON_EXPORTABLE_TYPE("upper bound; foo.C")!>C<!>>foo() { }
@JsExport
class A<T : C, S: I>
class A<T : <!NON_EXPORTABLE_TYPE("upper bound; foo.C")!>C<!>, S: <!NON_EXPORTABLE_TYPE("upper bound; foo.I")!>I<!>>
@JsExport
interface I2<T> where T : C, T : I
interface I2<T> where T : <!NON_EXPORTABLE_TYPE("upper bound; foo.C")!>C<!>, T : <!NON_EXPORTABLE_TYPE("upper bound; foo.I")!>I<!>
@JsExport
class B<T>(val a: T, val b: Comparable<T>) {
val c: Comparable<T> = b
class B<T>(val a: T, <!NON_EXPORTABLE_TYPE("parameter; kotlin.Comparable<T>")!>val b: Comparable<T><!>) {
<!NON_EXPORTABLE_TYPE("property; kotlin.Comparable<T>")!>val c: Comparable<T><!> = b
}
@JsExport