[TEST] Migrate AbstractDiagnosticsTestWithJsStdLib to new test runners
This commit is contained in:
@@ -10,4 +10,4 @@ fun test() {
|
||||
fun <T> dynamic(<!UNUSED_PARAMETER!>body<!>: dynamic.() -> T): T {
|
||||
val topLevel = null
|
||||
return topLevel.<!UNRESOLVED_REFERENCE!>body<!>()
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,4 +7,4 @@ fun test(d: dynamic) {
|
||||
d["foo"] != null
|
||||
d.foo == null
|
||||
d.foo != null
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -19,4 +19,4 @@ class A {
|
||||
operator fun iterator(): Iterator<dynamic> = TODO("")
|
||||
}
|
||||
|
||||
fun bar(f: (dynamic) -> Unit): Unit = TODO("")
|
||||
fun bar(f: (dynamic) -> Unit): Unit = TODO("")
|
||||
|
||||
+1
-1
@@ -15,4 +15,4 @@ fun <!DYNAMIC_RECEIVER_NOT_ALLOWED!>dynamic<!>.test() {
|
||||
v5.isDynamic() // to check that anything is resolvable
|
||||
|
||||
foo = 1
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,4 +9,4 @@ fun foo() {
|
||||
when (3) {
|
||||
<!WRONG_OPERATION_WITH_DYNAMIC!>!in<!> a -> println("ok")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,4 +5,4 @@ fun foo() {
|
||||
|
||||
a[0] = 23
|
||||
<!WRONG_OPERATION_WITH_DYNAMIC!>a[0, 1]<!> = 42
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,4 +4,4 @@ fun test(d: dynamic) {
|
||||
d.foo(1, name = "name")
|
||||
|
||||
d.foo(1, duplicate = "", <!ARGUMENT_PASSED_TWICE!>duplicate<!> = ""<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,4 @@ fun foo(dn: dynamic<!REDUNDANT_NULLABLE!>?<!>, d: dynamic, dnn: dynamic<!REDUNDA
|
||||
d.foo()
|
||||
d?.foo()
|
||||
d!!.foo()
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -24,4 +24,4 @@ class DynamicHandler {
|
||||
|
||||
class B {
|
||||
val x: dynamic by DynamicHandler()
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,4 +11,4 @@ fun foo() {
|
||||
|
||||
class C {
|
||||
operator fun rangeTo(other: dynamic): ClosedRange<dynamic> = TODO("not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -19,4 +19,4 @@ fun test(d: dynamic) {
|
||||
bar(<!WRONG_OPERATION_WITH_DYNAMIC!>*d<!>, 23, <!WRONG_OPERATION_WITH_DYNAMIC!>*d<!>)
|
||||
}
|
||||
|
||||
fun bar(vararg x: Int): Unit = TODO("$x")
|
||||
fun bar(vararg x: Int): Unit = TODO("$x")
|
||||
|
||||
Vendored
+1
-1
@@ -71,4 +71,4 @@ class C {
|
||||
|
||||
class WithInvoke {
|
||||
operator fun invoke() {}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -6,21 +6,21 @@ package foo
|
||||
open class NonExportedClass
|
||||
|
||||
@JsExport
|
||||
class <!NON_EXPORTABLE_TYPE("super", "NonExportedClass")!>ExportedClass<!> : NonExportedClass()
|
||||
class <!NON_EXPORTABLE_TYPE("super; NonExportedClass")!>ExportedClass<!> : NonExportedClass()
|
||||
|
||||
interface NonExportedInterface
|
||||
|
||||
@JsExport
|
||||
class <!NON_EXPORTABLE_TYPE("super", "NonExportedInterface")!>ExportedClass2<!> : NonExportedInterface
|
||||
class <!NON_EXPORTABLE_TYPE("super; NonExportedInterface")!>ExportedClass2<!> : NonExportedInterface
|
||||
|
||||
@JsExport
|
||||
open class ExportedGenericClass<T>
|
||||
|
||||
@JsExport
|
||||
class <!NON_EXPORTABLE_TYPE("super", "ExportedGenericClass<NonExportedClass>")!>ExportedClass3<!> : ExportedGenericClass<NonExportedClass>()
|
||||
class <!NON_EXPORTABLE_TYPE("super; ExportedGenericClass<NonExportedClass>")!>ExportedClass3<!> : ExportedGenericClass<NonExportedClass>()
|
||||
|
||||
@JsExport
|
||||
interface ExportedGenericInterface<T>
|
||||
|
||||
@JsExport
|
||||
class <!NON_EXPORTABLE_TYPE("super", "ExportedGenericInterface<NonExportedClass>")!>ExportedClass4<!> : ExportedGenericInterface<NonExportedClass>
|
||||
class <!NON_EXPORTABLE_TYPE("super; ExportedGenericInterface<NonExportedClass>")!>ExportedClass4<!> : ExportedGenericInterface<NonExportedClass>
|
||||
|
||||
+12
-12
@@ -7,30 +7,30 @@ package foo
|
||||
class C
|
||||
|
||||
@JsExport
|
||||
fun foo(<!NON_EXPORTABLE_TYPE("parameter", "C")!>x: C<!>) {
|
||||
fun foo(<!NON_EXPORTABLE_TYPE("parameter; C")!>x: C<!>) {
|
||||
}
|
||||
|
||||
<!NON_EXPORTABLE_TYPE("return", "C")!>@JsExport
|
||||
<!NON_EXPORTABLE_TYPE("return; C")!>@JsExport
|
||||
fun bar()<!> = C()
|
||||
|
||||
<!NON_EXPORTABLE_TYPE("property", "C")!>@JsExport
|
||||
<!NON_EXPORTABLE_TYPE("property; C")!>@JsExport
|
||||
val x: C<!> = C()
|
||||
|
||||
<!NON_EXPORTABLE_TYPE("property", "C")!>@JsExport
|
||||
<!NON_EXPORTABLE_TYPE("property; C")!>@JsExport
|
||||
var x2: C<!>
|
||||
get() = C()
|
||||
set(value) { }
|
||||
|
||||
@JsExport
|
||||
class A(
|
||||
<!NON_EXPORTABLE_TYPE("parameter", "C"), NON_EXPORTABLE_TYPE("property", "C")!>val x: C<!>,
|
||||
<!NON_EXPORTABLE_TYPE("parameter", "C")!>y: C<!>
|
||||
<!NON_EXPORTABLE_TYPE("property; C"), NON_EXPORTABLE_TYPE("parameter; C")!>val x: C<!>,
|
||||
<!NON_EXPORTABLE_TYPE("parameter; C")!>y: C<!>
|
||||
) {
|
||||
<!NON_EXPORTABLE_TYPE("return", "C")!>fun foo(<!NON_EXPORTABLE_TYPE("parameter", "C")!>x: C<!>)<!> = x
|
||||
<!NON_EXPORTABLE_TYPE("return; C")!>fun foo(<!NON_EXPORTABLE_TYPE("parameter; C")!>x: C<!>)<!> = x
|
||||
|
||||
<!NON_EXPORTABLE_TYPE("property", "C")!>val x2: C<!> = C()
|
||||
<!NON_EXPORTABLE_TYPE("property; C")!>val x2: C<!> = C()
|
||||
|
||||
<!NON_EXPORTABLE_TYPE("property", "C")!>var x3: C<!>
|
||||
<!NON_EXPORTABLE_TYPE("property; C")!>var x3: C<!>
|
||||
get() = C()
|
||||
set(value) { }
|
||||
}
|
||||
@@ -40,7 +40,7 @@ fun foo2() {
|
||||
}
|
||||
|
||||
@JsExport
|
||||
fun foo3(<!NON_EXPORTABLE_TYPE("parameter", "Unit")!>x: Unit<!>) {
|
||||
fun foo3(<!NON_EXPORTABLE_TYPE("parameter; Unit")!>x: Unit<!>) {
|
||||
}
|
||||
|
||||
@JsExport
|
||||
@@ -48,9 +48,9 @@ fun foo4(x: () -> Unit) {
|
||||
}
|
||||
|
||||
@JsExport
|
||||
fun foo5(<!NON_EXPORTABLE_TYPE("parameter", "(Unit) -> Unit")!>x: (Unit) -> Unit<!>) {
|
||||
fun foo5(<!NON_EXPORTABLE_TYPE("parameter; (Unit) -> Unit")!>x: (Unit) -> Unit<!>) {
|
||||
}
|
||||
|
||||
@JsExport
|
||||
fun foo6(x: (A) -> A) {
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -8,10 +8,10 @@ abstract class C
|
||||
interface I
|
||||
|
||||
@JsExport
|
||||
fun <<!NON_EXPORTABLE_TYPE("upper bound", "C")!>T : C<!>>foo() { }
|
||||
fun <<!NON_EXPORTABLE_TYPE("upper bound; C")!>T : C<!>>foo() { }
|
||||
|
||||
@JsExport
|
||||
class A<<!NON_EXPORTABLE_TYPE("upper bound", "C")!>T : C<!>, <!NON_EXPORTABLE_TYPE("upper bound", "I")!>S: I<!>>
|
||||
class A<<!NON_EXPORTABLE_TYPE("upper bound; C")!>T : C<!>, <!NON_EXPORTABLE_TYPE("upper bound; I")!>S: I<!>>
|
||||
|
||||
@JsExport
|
||||
interface I2<<!NON_EXPORTABLE_TYPE("upper bound", "C"), NON_EXPORTABLE_TYPE("upper bound", "I")!>T<!>> where T : C, T : I
|
||||
interface I2<<!NON_EXPORTABLE_TYPE("upper bound; C"), NON_EXPORTABLE_TYPE("upper bound; I")!>T<!>> where T : C, T : I
|
||||
|
||||
@@ -35,8 +35,8 @@ public interface I {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
|
||||
// -- Module: <main> --
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
|
||||
+9
-4
@@ -1,9 +1,6 @@
|
||||
// -- Module: <m1> --
|
||||
package
|
||||
|
||||
package bar {
|
||||
public fun box(): kotlin.Unit
|
||||
}
|
||||
|
||||
package foo {
|
||||
|
||||
@kotlin.js.JsModule(import = "A") public external object A {
|
||||
@@ -23,3 +20,11 @@ package foo {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
// -- Module: <m2> --
|
||||
package
|
||||
|
||||
package bar {
|
||||
public fun box(): kotlin.Unit
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -29,7 +29,6 @@ package foo {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// -- Module: <m2> --
|
||||
package
|
||||
|
||||
@@ -49,3 +48,4 @@ package bar {
|
||||
package foo {
|
||||
public external fun baz(): kotlin.Unit
|
||||
}
|
||||
|
||||
|
||||
+18
-13
@@ -1,18 +1,6 @@
|
||||
// -- Module: <m1> --
|
||||
package
|
||||
|
||||
package bar {
|
||||
public inline fun </*0*/ reified T> boo(/*0*/ x: T): kotlin.Unit
|
||||
public fun box(): kotlin.Unit
|
||||
|
||||
public final external class DerivedB : foo.B {
|
||||
public constructor DerivedB()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun foo(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
package foo {
|
||||
@kotlin.js.JsNonModule public external fun bar(): kotlin.Unit
|
||||
|
||||
@@ -40,3 +28,20 @@ package foo {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -- Module: <m2> --
|
||||
package
|
||||
|
||||
package bar {
|
||||
public inline fun </*0*/ reified T> boo(/*0*/ x: T): kotlin.Unit
|
||||
public fun box(): kotlin.Unit
|
||||
|
||||
public final external class DerivedB : foo.B {
|
||||
public constructor DerivedB()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun foo(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,4 +22,4 @@ val x: Int
|
||||
fun box(x: dynamic) {
|
||||
x.<!NAME_CONTAINS_ILLEGAL_CHARS!>`foo-bar`<!>()
|
||||
x.<!NAME_CONTAINS_ILLEGAL_CHARS!>`ba-z`<!>
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@ inline fun A.foo(x: Int): String = asDynamic().foo(x)
|
||||
|
||||
inline operator fun A.get(x: Int): String = asDynamic()[x]
|
||||
|
||||
inline operator fun A.B.get(x: Int): String = asDynamic()[x]
|
||||
inline operator fun A.B.get(x: Int): String = asDynamic()[x]
|
||||
|
||||
Reference in New Issue
Block a user