Private outer functions are now accessed via bridge methods. Added tests.

This commit is contained in:
Evgeny Gerashchenko
2012-06-19 22:34:22 +04:00
parent 993aecbc94
commit 5ecfd71611
4 changed files with 86 additions and 4 deletions
@@ -0,0 +1,31 @@
class C {
private fun String.ext() : String = ""
private fun f() {}
public fun foo() : String {
{
"".ext()
f()
}.invoke()
object : Runnable {
public override fun run() {
"".ext()
f()
}
}.run()
Inner().innerFun()
return "OK"
}
private class Inner() {
fun innerFun() {
"".ext()
f()
}
}
}
fun box() = C().foo()