Fix for KT-9855: java.lang.IllegalAccessError when using private package level operator method

#KT-9855 Fixed
This commit is contained in:
Michael Bogdanov
2015-11-05 12:58:56 +03:00
parent bd2b01ac1c
commit 4d77181692
3 changed files with 22 additions and 1 deletions
+15
View File
@@ -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")
}