Support JvmPackageName annotation in JVM back-end
This annotation is currently internal because we only commit to its support for our own libraries. It will be used to change JVM package names of declarations in JDK-specific stdlib additions (now called kotlin-stdlib-jre7/8), both to preserve source compatibility of the old Kotlin code and to solve the split package problem (KT-19258)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
|
||||
// FILE: 1.kt
|
||||
|
||||
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@file:JvmPackageName("baz.foo.quux.bar")
|
||||
package foo.bar
|
||||
|
||||
fun f(): String = "O"
|
||||
|
||||
val g: String? get() = "K"
|
||||
|
||||
inline fun <T> i(block: () -> T): T = block()
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import foo.bar.*
|
||||
|
||||
fun box(): String = i { f() + g }
|
||||
Reference in New Issue
Block a user