/**
* @test /nodynamiccopyright/
* @bug 4094658 4277296 4785453
* @summary Test enforcement of JLS 6.6.1 and 6.6.2 rules requiring that
* the type to which a component member belongs be accessible in qualified
* names.
*
* @compile/fail/ref=QualifiedAccess_1.out -XDrawDiagnostics QualifiedAccess_1.java
*/
public class QualifiedAccess_1 {
// Inaccessible types in member declarations.
// These exercise 'Env.resolve'.
// Errors are localized poorly.
//
// Fields 'P3' and 'P5' are inaccessible.
void test1() {
// Inaccessible types in local variable declarations.
// These exercise 'FieldExpression.checkCommon'.
//
// Fields 'P3' and 'P5' are inaccessible.
}
void test2() {
// Inaccessible types in casts.
// These exercise 'FieldExpression.checkCommon'.
//
// Fields 'P3' and 'P5' are inaccessible.
}
void test3() {
// Inaccessible types in 'instanceof' expressions.
// These exercise 'FieldExpression.checkCommon'.
//
// Fields 'P3' and 'P5' are inaccessible.
}
}