[JS FIR] Enable warnings and infos for JS FIR tests
This commit is contained in:
committed by
Space Team
parent
862be5a787
commit
b1465fbfb8
+14
-14
@@ -1,29 +1,29 @@
|
||||
// !DIAGNOSTICS: -REDUNDANT_NULLABLE
|
||||
|
||||
fun test(d: Any, dl: Collection<dynamic>) {
|
||||
d as <!DYNAMIC_NOT_ALLOWED!>dynamic<!>
|
||||
d as <!DYNAMIC_NOT_ALLOWED!>dynamic?<!>
|
||||
d <!USELESS_CAST!>as <!DYNAMIC_NOT_ALLOWED!>dynamic<!><!>
|
||||
d <!USELESS_CAST!>as <!DYNAMIC_NOT_ALLOWED!>dynamic?<!><!>
|
||||
|
||||
d as? <!DYNAMIC_NOT_ALLOWED!>dynamic<!>
|
||||
d as? <!DYNAMIC_NOT_ALLOWED!>dynamic?<!>
|
||||
d <!USELESS_CAST!>as? <!DYNAMIC_NOT_ALLOWED!>dynamic<!><!>
|
||||
d <!USELESS_CAST!>as? <!DYNAMIC_NOT_ALLOWED!>dynamic?<!><!>
|
||||
|
||||
d is <!DYNAMIC_NOT_ALLOWED!>dynamic<!>
|
||||
d is <!DYNAMIC_NOT_ALLOWED!>dynamic?<!>
|
||||
<!USELESS_IS_CHECK!>d is <!DYNAMIC_NOT_ALLOWED!>dynamic<!><!>
|
||||
<!USELESS_IS_CHECK!>d is <!DYNAMIC_NOT_ALLOWED!>dynamic?<!><!>
|
||||
|
||||
d !is <!DYNAMIC_NOT_ALLOWED!>dynamic<!>
|
||||
d !is <!DYNAMIC_NOT_ALLOWED!>dynamic?<!>
|
||||
<!USELESS_IS_CHECK!>d !is <!DYNAMIC_NOT_ALLOWED!>dynamic<!><!>
|
||||
<!USELESS_IS_CHECK!>d !is <!DYNAMIC_NOT_ALLOWED!>dynamic?<!><!>
|
||||
|
||||
when (d) {
|
||||
is <!DYNAMIC_NOT_ALLOWED!>dynamic<!> -> {}
|
||||
is <!DYNAMIC_NOT_ALLOWED!>dynamic?<!> -> {}
|
||||
!is <!DYNAMIC_NOT_ALLOWED!>dynamic<!> -> {}
|
||||
!is <!DYNAMIC_NOT_ALLOWED!>dynamic?<!> -> {}
|
||||
<!USELESS_IS_CHECK!>is <!DYNAMIC_NOT_ALLOWED!>dynamic<!><!> -> {}
|
||||
<!USELESS_IS_CHECK!>is <!DUPLICATE_LABEL_IN_WHEN, DYNAMIC_NOT_ALLOWED!>dynamic?<!><!> -> {}
|
||||
<!USELESS_IS_CHECK!>!is <!DYNAMIC_NOT_ALLOWED!>dynamic<!><!> -> {}
|
||||
<!USELESS_IS_CHECK!>!is <!DUPLICATE_LABEL_IN_WHEN, DYNAMIC_NOT_ALLOWED!>dynamic?<!><!> -> {}
|
||||
}
|
||||
|
||||
dl as List<dynamic>
|
||||
dl is List<dynamic>
|
||||
<!USELESS_IS_CHECK!>dl is List<dynamic><!>
|
||||
|
||||
when (dl) {
|
||||
is List<dynamic> -> {}
|
||||
<!USELESS_IS_CHECK!>is List<dynamic><!> -> {}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// !MARK_DYNAMIC_CALLS
|
||||
|
||||
// !DIAGNOSTICS: -ERROR_SUPPRESSION
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@kotlin.internal.DynamicExtension
|
||||
fun dynamic.onDynamicFun() = 1
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// !MARK_DYNAMIC_CALLS
|
||||
|
||||
// !DIAGNOSTICS: -ERROR_SUPPRESSION
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@kotlin.internal.DynamicExtension
|
||||
fun dynamic.onDynamicFun() = 1
|
||||
@@ -25,4 +25,4 @@ fun test(d: dynamic, a: Any?) {
|
||||
a.<!UNRESOLVED_REFERENCE!>onDynamicProperty<!>
|
||||
}
|
||||
|
||||
fun <T> eatT(<!UNUSED_PARAMETER!>t<!>: T) {}
|
||||
fun <T> eatT(<!UNUSED_PARAMETER!>t<!>: T) {}
|
||||
|
||||
+14
@@ -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 {}
|
||||
+22
@@ -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
|
||||
}
|
||||
|
||||
+11
-11
@@ -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
|
||||
|
||||
compiler/testData/diagnostics/testsWithJsStdLib/export/nonConsumableIdentifiersInExportedFile.fir.kt
Vendored
+6
-6
@@ -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 {
|
||||
|
||||
+14
-14
@@ -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
|
||||
|
||||
Vendored
+5
-5
@@ -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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -ERROR_SUPPRESSION
|
||||
@file:Suppress("UNUSED_PARAMETER", "CONFLICTING_OVERLOADS", "REDECLARATION")
|
||||
|
||||
class A1 {
|
||||
|
||||
Vendored
+2
-1
@@ -1,5 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +InlineClasses, -JvmInlineValueClasses, -JsAllowValueClassesInExternals
|
||||
// !DIAGNOSTICS: -OPT_IN_USAGE
|
||||
|
||||
// FILE: uint.kt
|
||||
|
||||
@@ -62,4 +63,4 @@ external interface EI {
|
||||
fun foo(): <!INLINE_CLASS_IN_EXTERNAL_DECLARATION!>SomeIC<!>
|
||||
fun foo(<!INLINE_CLASS_IN_EXTERNAL_DECLARATION!>c: SomeIC<!>): <!INLINE_CLASS_IN_EXTERNAL_DECLARATION!>SomeIC<!>
|
||||
fun foo(a: Int, <!INLINE_CLASS_IN_EXTERNAL_DECLARATION!>c: SomeIC<!>): <!INLINE_CLASS_IN_EXTERNAL_DECLARATION!>SomeIC<!>
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +InlineClasses, -JvmInlineValueClasses, +JsAllowValueClassesInExternals
|
||||
// !DIAGNOSTICS: +INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING
|
||||
// !DIAGNOSTICS: +INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING -OPT_IN_USAGE
|
||||
|
||||
// FILE: uint.kt
|
||||
|
||||
@@ -63,4 +63,4 @@ external interface EI {
|
||||
fun foo(): <!INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING!>SomeIC<!>
|
||||
fun foo(<!INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING!>c: SomeIC<!>): <!INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING!>SomeIC<!>
|
||||
fun foo(a: Int, <!INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING!>c: SomeIC<!>): <!INLINE_CLASS_IN_EXTERNAL_DECLARATION_WARNING!>SomeIC<!>
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -NOTHING_TO_INLINE
|
||||
external class A {
|
||||
class B
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user