Do not mangle internal @PublishedApi functions

This commit is contained in:
Mikhael Bogdanov
2016-12-07 17:03:06 +01:00
parent 5ffc0b36b0
commit 18cb734c58
9 changed files with 140 additions and 1 deletions
@@ -0,0 +1,15 @@
// IGNORE_BACKEND: JS
//WITH_REFLECT
class A {
@PublishedApi
internal fun published() = "OK"
inline fun test() = published()
}
fun box() : String {
val clazz = A::class.java
if (clazz.getDeclaredMethod("published") == null) return "fail"
return "OK"
}
+12
View File
@@ -0,0 +1,12 @@
class A {
@PublishedApi
internal fun published() = "OK"
inline fun test() = published()
}
fun box() : String {
return A().test()
}
@@ -0,0 +1,10 @@
public final class A {
public method <init>(): void
public final @kotlin.PublishedApi @org.jetbrains.annotations.NotNull method published(): java.lang.String
public final @org.jetbrains.annotations.NotNull method test(): java.lang.String
}
public final class NoManglingKt {
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
}
@@ -0,0 +1,10 @@
public final class A {
public method <init>(): void
public final @kotlin.PublishedApi @org.jetbrains.annotations.NotNull method published(): java.lang.String
public final @org.jetbrains.annotations.NotNull method test(): java.lang.String
}
public final class SimpleKt {
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
}