forked from JetBrains/kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
288 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
...el/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
...c/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
...jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
...n/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithPsiTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
86 changes: 86 additions & 0 deletions
86
compiler/testData/diagnostics/tests/multiplatform/expectsWithJsExport.fir.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
// ISSUE: KT-64951 | ||
|
||
// MODULE: m1-common | ||
// FILE: common1.kt | ||
|
||
@Target(AnnotationTarget.FILE, AnnotationTarget.CLASS) | ||
expect annotation class Export() | ||
|
||
@Export | ||
expect class <!WRONG_EXPORTED_DECLARATION!>WithExportOnExpect<!> { | ||
<!WRONG_EXPORTED_DECLARATION!>fun foo()<!> | ||
<!WRONG_EXPORTED_DECLARATION, WRONG_EXPORTED_DECLARATION!>val bar: Int<!> | ||
} | ||
|
||
expect class WithExportOnActual { | ||
<!WRONG_EXPORTED_DECLARATION!>fun foo()<!> | ||
<!WRONG_EXPORTED_DECLARATION, WRONG_EXPORTED_DECLARATION!>val bar: Int<!> | ||
} | ||
|
||
expect class WithExportTypealiasOnActual { | ||
<!WRONG_EXPORTED_DECLARATION!>fun foo()<!> | ||
<!WRONG_EXPORTED_DECLARATION, WRONG_EXPORTED_DECLARATION!>val bar: Int<!> | ||
} | ||
|
||
expect class <!WRONG_EXPORTED_DECLARATION!>WithFileExportOnActual<!> { | ||
fun foo() | ||
val bar: Int | ||
} | ||
|
||
// FILE: common2.kt | ||
@file:Export | ||
|
||
expect class WithExportOnExpectFile { | ||
fun foo() | ||
val bar: Int | ||
} | ||
|
||
// MODULE: m1-js()()(m1-common) | ||
|
||
// FILE: annotation.kt | ||
package kotlin.js | ||
|
||
@Target(AnnotationTarget.FILE, AnnotationTarget.CLASS) | ||
annotation class JsExport | ||
|
||
// FILE: alias.kt | ||
import kotlin.js.* | ||
|
||
actual typealias Export = kotlin.js.JsExport | ||
|
||
// FILE: js1.kt | ||
import kotlin.js.* | ||
|
||
@Export | ||
actual class WithExportOnExpect { | ||
actual fun foo() {} | ||
actual val bar = 42 | ||
} | ||
|
||
@JsExport | ||
actual class WithExportOnActual { | ||
actual fun foo() {} | ||
actual val bar = 42 | ||
} | ||
|
||
@Export | ||
actual class WithExportTypealiasOnActual { | ||
actual fun foo() {} | ||
actual val bar = 42 | ||
} | ||
|
||
// FILE: js2.kt | ||
@file:JsExport | ||
import kotlin.js.* | ||
|
||
actual class WithFileExportOnActual { | ||
actual fun foo() {} | ||
actual val bar: Int = 42 | ||
} | ||
|
||
// FILE: js3.kt | ||
|
||
actual class WithExportOnExpectFile { | ||
actual fun foo() {} | ||
actual val bar: Int = 42 | ||
} |
86 changes: 86 additions & 0 deletions
86
compiler/testData/diagnostics/tests/multiplatform/expectsWithJsExport.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
// ISSUE: KT-64951 | ||
|
||
// MODULE: m1-common | ||
// FILE: common1.kt | ||
|
||
@Target(AnnotationTarget.FILE, AnnotationTarget.CLASS) | ||
expect annotation class Export() | ||
|
||
@Export | ||
expect class <!WRONG_EXPORTED_DECLARATION{JS}!>WithExportOnExpect<!> { | ||
<!WRONG_EXPORTED_DECLARATION{JS}!>fun foo()<!> | ||
<!WRONG_EXPORTED_DECLARATION{JS}!>val bar: Int<!> | ||
} | ||
|
||
expect class WithExportOnActual { | ||
fun foo() | ||
val bar: Int | ||
} | ||
|
||
expect class WithExportTypealiasOnActual { | ||
fun foo() | ||
val bar: Int | ||
} | ||
|
||
expect class WithFileExportOnActual { | ||
fun foo() | ||
val bar: Int | ||
} | ||
|
||
// FILE: common2.kt | ||
@file:Export | ||
|
||
expect class <!WRONG_EXPORTED_DECLARATION{JS}!>WithExportOnExpectFile<!> { | ||
<!WRONG_EXPORTED_DECLARATION{JS}!>fun foo()<!> | ||
<!WRONG_EXPORTED_DECLARATION{JS}!>val bar: Int<!> | ||
} | ||
|
||
// MODULE: m1-js()()(m1-common) | ||
|
||
// FILE: annotation.kt | ||
package kotlin.js | ||
|
||
@Target(AnnotationTarget.FILE, AnnotationTarget.CLASS) | ||
annotation class JsExport | ||
|
||
// FILE: alias.kt | ||
import kotlin.js.* | ||
|
||
actual typealias Export = kotlin.js.JsExport | ||
|
||
// FILE: js1.kt | ||
import kotlin.js.* | ||
|
||
@Export | ||
actual class WithExportOnExpect { | ||
actual fun foo() {} | ||
actual val bar = 42 | ||
} | ||
|
||
@JsExport | ||
actual class WithExportOnActual { | ||
actual fun foo() {} | ||
actual val bar = 42 | ||
} | ||
|
||
@Export | ||
actual class WithExportTypealiasOnActual { | ||
actual fun foo() {} | ||
actual val bar = 42 | ||
} | ||
|
||
// FILE: js2.kt | ||
@file:JsExport | ||
import kotlin.js.* | ||
|
||
actual class WithFileExportOnActual { | ||
actual fun foo() {} | ||
actual val bar: Int = 42 | ||
} | ||
|
||
// FILE: js3.kt | ||
|
||
actual class WithExportOnExpectFile { | ||
actual fun foo() {} | ||
actual val bar: Int = 42 | ||
} |
86 changes: 86 additions & 0 deletions
86
compiler/testData/diagnostics/tests/multiplatform/expectsWithJsExport.ll.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
// ISSUE: KT-64951 | ||
|
||
// MODULE: m1-common | ||
// FILE: common1.kt | ||
|
||
@Target(AnnotationTarget.FILE, AnnotationTarget.CLASS) | ||
expect annotation class Export() | ||
|
||
@Export | ||
expect class WithExportOnExpect { | ||
fun foo() | ||
val bar: Int | ||
} | ||
|
||
expect class WithExportOnActual { | ||
fun foo() | ||
val bar: Int | ||
} | ||
|
||
expect class WithExportTypealiasOnActual { | ||
fun foo() | ||
val bar: Int | ||
} | ||
|
||
expect class WithFileExportOnActual { | ||
fun foo() | ||
val bar: Int | ||
} | ||
|
||
// FILE: common2.kt | ||
@file:Export | ||
|
||
expect class WithExportOnExpectFile { | ||
fun foo() | ||
val bar: Int | ||
} | ||
|
||
// MODULE: m1-js()()(m1-common) | ||
|
||
// FILE: annotation.kt | ||
package kotlin.js | ||
|
||
@Target(AnnotationTarget.FILE, AnnotationTarget.CLASS) | ||
annotation class JsExport | ||
|
||
// FILE: alias.kt | ||
import kotlin.<!UNRESOLVED_IMPORT!>js<!>.* | ||
|
||
actual typealias Export = kotlin.<!UNRESOLVED_REFERENCE!>js<!>.JsExport | ||
|
||
// FILE: js1.kt | ||
import kotlin.<!UNRESOLVED_IMPORT!>js<!>.* | ||
|
||
@Export | ||
actual class WithExportOnExpect { | ||
actual fun foo() {} | ||
actual val bar = 42 | ||
} | ||
|
||
@<!UNRESOLVED_REFERENCE!>JsExport<!> | ||
actual class WithExportOnActual { | ||
actual fun foo() {} | ||
actual val bar = 42 | ||
} | ||
|
||
@Export | ||
actual class WithExportTypealiasOnActual { | ||
actual fun foo() {} | ||
actual val bar = 42 | ||
} | ||
|
||
// FILE: js2.kt | ||
@file:<!UNRESOLVED_REFERENCE!>JsExport<!> | ||
import kotlin.<!UNRESOLVED_IMPORT!>js<!>.* | ||
|
||
actual class WithFileExportOnActual { | ||
actual fun foo() {} | ||
actual val bar: Int = 42 | ||
} | ||
|
||
// FILE: js3.kt | ||
|
||
actual class WithExportOnExpectFile { | ||
actual fun foo() {} | ||
actual val bar: Int = 42 | ||
} |
6 changes: 6 additions & 0 deletions
6
...tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.