Fix for KT-16801: Accessors of @PublishedApi property gets mangled

#KT-16801 Fixed
This commit is contained in:
Mikhael Bogdanov
2017-03-13 10:49:09 +01:00
parent c46164481a
commit ce3b455f57
5 changed files with 19 additions and 10 deletions
+8 -4
View File
@@ -2,14 +2,18 @@
//WITH_REFLECT
class A {
@PublishedApi
internal fun published() = "OK"
internal fun published() = "O"
inline fun test() = published()
@PublishedApi
internal var publishedProp = "K"
inline fun test() = published() + publishedProp
}
fun box() : String {
val clazz = A::class.java
if (clazz.getDeclaredMethod("published") == null) return "fail"
return "OK"
if (clazz.getDeclaredMethod("published") == null) return "fail 1"
if (clazz.getDeclaredMethod("getPublishedProp") == null) return "fail 2"
if (clazz.getDeclaredMethod("setPublishedProp", String::class.java) == null) return "fail 3"
return A().test()
}