[FIR JS] Stop reporting NON_MEMBER_FUNCTION_NO_BODY for js natives

This commit is contained in:
Nikolay Lunyak
2023-01-04 16:56:39 +02:00
committed by Space Team
parent 85bcef537c
commit 2f9831ed99
16 changed files with 84 additions and 42 deletions
@@ -1,13 +0,0 @@
// !DIAGNOSTICS: -DEPRECATION
<!NON_MEMBER_FUNCTION_NO_BODY!>@nativeGetter
fun String.foo(n: Int): Int?<!>
@nativeGetter
fun String.bar(n: Int): Int? = definedExternally
external interface T {
@nativeGetter
fun foo(d: Double): String?
@nativeGetter
fun bar(d: Double): String?
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -DEPRECATION
@nativeGetter
fun String.foo(n: Int): Int?
@@ -1,13 +0,0 @@
// !DIAGNOSTICS: -DEPRECATION
<!NON_MEMBER_FUNCTION_NO_BODY!>@nativeInvoke
fun String.foo(): Int<!>
@nativeInvoke
fun String.bar(): Int = definedExternally
external object O {
@nativeInvoke
fun foo()
@nativeInvoke
fun bar() { definedExternally }
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -DEPRECATION
@nativeInvoke
fun String.foo(): Int
@@ -1,13 +0,0 @@
// !DIAGNOSTICS: -DEPRECATION
<!NON_MEMBER_FUNCTION_NO_BODY!>@nativeSetter
fun String.foo(n: Int, v: Any)<!>
@nativeSetter
fun String.bar(n: Int, v: Any) {}
external class C {
@nativeSetter
fun foo(d: Double, v: Any): Any
@nativeSetter
fun bar(d: Double, v: Any): Any = definedExternally
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -DEPRECATION
@nativeSetter
fun String.foo(n: Int, v: Any)