public methods in private classes visibility check

This commit is contained in:
Svetlana Isakova
2012-04-02 14:53:26 +04:00
parent ffbce7fe1e
commit e364fe4259
6 changed files with 79 additions and 50 deletions
@@ -0,0 +1,31 @@
//FILE:a.kt
package a
private class A {
fun bar() {}
}
private fun foo() {}
fun makeA() = A()
//FILE:b.kt
package a.b
import a.*
fun test() {
val y = makeA()
y.<!UNRESOLVED_REFERENCE!>bar<!>()
<!UNRESOLVED_REFERENCE!>foo<!>()
}
class A {
class B {
fun foo() {
val y = makeA() //assure that 'makeA' is visible
}
}
}