[FIR JS] Prepare the test data for FIR
This commit is contained in:
committed by
Space Team
parent
0e38d0ebd2
commit
73c89a5d9d
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -DEPRECATION
|
||||
|
||||
fun foo() {
|
||||
@nativeGetter
|
||||
fun Int.get(a: String): Int? = 1
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get2(a: Number): String? = "OK"
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get3(a: Int): String? = "OK"
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get(a: Any): Int? = 1
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get2(): String? = "OK"
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get3(a: Any, b: Int, c: Any?): String? = "OK"
|
||||
|
||||
@nativeGetter
|
||||
fun Any.foo(a: Int = 1): Any? = "OK"
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -NON_TOPLEVEL_CLASS_DECLARATION, -DEPRECATION
|
||||
|
||||
fun foo() {
|
||||
class A {
|
||||
@nativeGetter
|
||||
fun get(a: String): Any? = null
|
||||
|
||||
@nativeGetter
|
||||
fun take(a: Number): String? = null
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Double): String? = null
|
||||
}
|
||||
|
||||
class B {
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
val foo = 0
|
||||
}
|
||||
|
||||
class C {
|
||||
@nativeGetter
|
||||
fun Int.get(a: String): Int? = 1
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get2(a: Number): String? = "OK"
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get3(a: Int): String? = "OK"
|
||||
|
||||
@nativeGetter
|
||||
fun get(): Any? = null
|
||||
|
||||
@nativeGetter
|
||||
fun get(a: A): Any? = null
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Int) {}
|
||||
|
||||
@nativeGetter
|
||||
fun bar(a: String): Int = 0
|
||||
|
||||
@nativeGetter
|
||||
fun baz(a: Int = 0): Int? = 0
|
||||
}
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -NON_TOPLEVEL_CLASS_DECLARATION, -DEPRECATION
|
||||
|
||||
fun foo() {
|
||||
@nativeGetter
|
||||
fun toplevelFun(): Any = 0
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
val toplevelVal = 0
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
class Foo {}
|
||||
}
|
||||
Vendored
+57
@@ -0,0 +1,57 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -DEPRECATION
|
||||
|
||||
external class A {
|
||||
@nativeGetter
|
||||
fun get(a: String): Any? = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun take(a: Number): String? = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Double): String? = definedExternally
|
||||
|
||||
companion object {
|
||||
@nativeGetter
|
||||
fun get(a: String): Any? = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun take(a: Number): String? = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Double): String? = definedExternally
|
||||
}
|
||||
}
|
||||
|
||||
external class B {
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
val foo: Int = definedExternally
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
object Obj1 {}
|
||||
|
||||
companion object {
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
val foo: Int = definedExternally
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
object Obj2 {}
|
||||
}
|
||||
}
|
||||
|
||||
external class C {
|
||||
@nativeGetter
|
||||
fun get(): Any? = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun get(a: A): Any? = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Int) { definedExternally }
|
||||
|
||||
@nativeGetter
|
||||
fun bar(a: String): Int = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun baz(a: String = definedExternally): Int? = definedExternally
|
||||
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -DEPRECATION
|
||||
|
||||
external class A {
|
||||
class B {
|
||||
class A {
|
||||
@nativeGetter
|
||||
fun get(a: String): Any? = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun take(a: Number): String? = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Double): String? = definedExternally
|
||||
|
||||
companion object {
|
||||
@nativeGetter
|
||||
fun get(a: String): Any? = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun take(a: Number): String? = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Double): String? = definedExternally
|
||||
}
|
||||
}
|
||||
|
||||
class B {
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
val foo: Int = definedExternally
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
object Obj1 {}
|
||||
|
||||
companion object {
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
val foo: Int = definedExternally
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
object Obj2 {}
|
||||
}
|
||||
}
|
||||
|
||||
class C {
|
||||
@nativeGetter
|
||||
fun get(): Any? = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun get(a: A): Any? = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Int) { definedExternally }
|
||||
|
||||
@nativeGetter
|
||||
fun bar(a: String): Int = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun baz(a: Number = definedExternally): Int? = definedExternally
|
||||
}
|
||||
|
||||
object obj {
|
||||
@nativeGetter
|
||||
fun get(): Any? = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun get(a: A): Any? = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Int) { definedExternally }
|
||||
|
||||
@nativeGetter
|
||||
fun bar(a: String): Int = definedExternally
|
||||
|
||||
@nativeGetter
|
||||
fun baz(a: String = definedExternally): Int? = definedExternally
|
||||
}
|
||||
}
|
||||
}
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -NON_TOPLEVEL_CLASS_DECLARATION, -DEPRECATION
|
||||
|
||||
class A {
|
||||
class B {
|
||||
class A {
|
||||
@nativeGetter
|
||||
fun get(a: String): Any? = null
|
||||
|
||||
@nativeGetter
|
||||
fun take(a: Number): String? = null
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Double): String? = null
|
||||
|
||||
companion object {
|
||||
@nativeGetter
|
||||
fun get(a: String): Any? = null
|
||||
|
||||
@nativeGetter
|
||||
fun take(a: Number): String? = null
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Double): String? = null
|
||||
}
|
||||
}
|
||||
|
||||
class B {
|
||||
@nativeGetter
|
||||
fun Int.get(a: String): Int? = 1
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get2(a: Number): String? = "OK"
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get3(a: Int): String? = "OK"
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
val foo = 0
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
object Obj1 {}
|
||||
|
||||
companion object {
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
val foo = 0
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
object Obj2 {}
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get(a: String): Int? = 1
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get2(a: Number): String? = "OK"
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get3(a: Int): String? = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
class C {
|
||||
@nativeGetter
|
||||
fun get(): Any? = null
|
||||
|
||||
@nativeGetter
|
||||
fun get(a: A): Any? = null
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Int) {}
|
||||
|
||||
@nativeGetter
|
||||
fun bar(a: String): Int = 0
|
||||
|
||||
@nativeGetter
|
||||
fun baz(a: String = "foo"): Int? = 0
|
||||
}
|
||||
|
||||
object obj {
|
||||
@nativeGetter
|
||||
fun get(): Any? = null
|
||||
|
||||
@nativeGetter
|
||||
fun get(a: A): Any? = null
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Int) {}
|
||||
|
||||
@nativeGetter
|
||||
fun bar(a: String): Int = 0
|
||||
|
||||
@nativeGetter
|
||||
fun baz(a: Double = 0.0): Int? = 0
|
||||
}
|
||||
|
||||
val anonymous = object {
|
||||
@nativeGetter
|
||||
fun get(): Any? = null
|
||||
|
||||
@nativeGetter
|
||||
fun get(a: A): Any? = null
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Int) {}
|
||||
|
||||
@nativeGetter
|
||||
fun bar(a: String): Int = 0
|
||||
|
||||
@nativeGetter
|
||||
fun baz(a: String = "foo"): Int? = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+65
@@ -0,0 +1,65 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -DEPRECATION
|
||||
|
||||
class A {
|
||||
@nativeGetter
|
||||
fun get(a: String): Any? = null
|
||||
|
||||
@nativeGetter
|
||||
fun take(a: Number): String? = null
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Double): String? = null
|
||||
|
||||
companion object {
|
||||
@nativeGetter
|
||||
fun get(a: String): Any? = null
|
||||
|
||||
@nativeGetter
|
||||
fun take(a: Number): String? = null
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Double): String? = null
|
||||
}
|
||||
}
|
||||
|
||||
class B {
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
val foo = 0
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
object Obj1 {}
|
||||
|
||||
companion object {
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
val foo = 0
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
object Obj2 {}
|
||||
}
|
||||
}
|
||||
|
||||
class C {
|
||||
@nativeGetter
|
||||
fun Int.get(a: String): Int? = 1
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get2(a: Number): String? = "OK"
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get3(a: Int): String? = "OK"
|
||||
|
||||
@nativeGetter
|
||||
fun get(): Any? = null
|
||||
|
||||
@nativeGetter
|
||||
fun get(a: A): Any? = null
|
||||
|
||||
@nativeGetter
|
||||
fun foo(a: Int) {}
|
||||
|
||||
@nativeGetter
|
||||
fun bar(a: String): Int = 0
|
||||
|
||||
@nativeGetter
|
||||
fun baz(a: String = "foo"): Int? = 0
|
||||
}
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -DEPRECATION
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get(a: String): Int? = 1
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get2(a: Number): String? = "OK"
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get3(a: Int): String? = "OK"
|
||||
|
||||
@nativeGetter
|
||||
fun Int.baz(a: Int = 0): String? = "OK"
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get(a: Any): Int? = 1
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get2(): String? = "OK"
|
||||
|
||||
@nativeGetter
|
||||
fun Int.get3(a: Any, b: Int, c: Any?): String? = "OK"
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -DEPRECATION
|
||||
|
||||
@nativeGetter
|
||||
fun toplevelFun(): Any = 0
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
val toplevelVal = 0
|
||||
|
||||
<!WRONG_ANNOTATION_TARGET!>@nativeGetter<!>
|
||||
class Foo {}
|
||||
Reference in New Issue
Block a user