Files
kotlin-fork/idea/testData/diagnosticMessage/invisibleMember.kt
T
Svetlana Isakova 2f02427c57 changed DiagnosticMessageTest
added test arguments to test data
2013-10-16 20:41:23 +04:00

19 lines
388 B
Kotlin

// !DIAGNOSTICS_NUMBER: 3
// !DIAGNOSTICS: INVISIBLE_MEMBER
package foo.bar
class A {
private class B
public class C private()
private fun bar() {}
}
fun foo() {
A.B() // ERROR 1: Cannot access 'B': it is 'private' in 'A'
A.C() // ERROR 2: Cannot access '' : it is 'private' in 'C'
A().bar() // ERROR 3: Cannot access 'bar' : it is 'private' in 'A'
}