Fix for KT-16801: Accessors of @PublishedApi property gets mangled
#KT-16801 Fixed
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user