Fix for KT-9855: java.lang.IllegalAccessError when using private package level operator method
#KT-9855 Fixed
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
class MyString(var content : String)
|
||||
|
||||
object Greeter {
|
||||
fun sayHello(name : String): String {
|
||||
var result = MyString(name)
|
||||
result += "K"
|
||||
return result.content
|
||||
}
|
||||
}
|
||||
|
||||
private operator fun MyString.plus(suffix: String) : MyString = MyString("${this.content}$suffix")
|
||||
|
||||
fun box(): String {
|
||||
return Greeter.sayHello("O")
|
||||
}
|
||||
Reference in New Issue
Block a user