Files
kotlin-fork/compiler/testData/diagnostics/testsWithJsStdLib/native/body.kt
T
Nikolay Lunyak a20e29e8b7 [FIR JS] Implement FirJsExternalChecker
The JsAllowValueClassesInExternals feature is enabled explicitly,
because otherwise it's enabled
implicitly depending on the backend. See:
org/jetbrains/kotlin/test/builders/LanguageVersionSettingsBuilder.kt:90

A property may have a fake source return kind, while its accessor
has a real source kind. In this case we can't "just copy"
the property return type down to the accessor.
2023-01-09 08:57:11 +00:00

31 lines
762 B
Kotlin
Vendored

// FIR_IDENTICAL
external fun foo(): Int = definedExternally
external fun bar(): Unit {
definedExternally
}
external fun baz(): Int = <!WRONG_BODY_OF_EXTERNAL_DECLARATION!>23<!>
external fun f(x: Int, y: String = definedExternally): Unit
external fun g(x: Int, y: String = <!WRONG_DEFAULT_VALUE_FOR_EXTERNAL_FUN_PARAMETER!>""<!>): Unit
external var a: Int
get() = definedExternally
set(value) {
definedExternally
}
external val b: Int
get() = <!WRONG_BODY_OF_EXTERNAL_DECLARATION!>23<!>
external val c: Int = definedExternally
external val d: Int = <!WRONG_INITIALIZER_OF_EXTERNAL_DECLARATION!>23<!>
external class C {
fun foo(): Int = definedExternally
fun bar(): Int = <!WRONG_BODY_OF_EXTERNAL_DECLARATION!>23<!>
}