File: ExprQualifiedType.java

package info (click to toggle)
libnb-javaparser-java 9%2B2018-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 65,172 kB
  • sloc: java: 440,096; xml: 6,359; sh: 865; makefile: 314
file content (21 lines) | stat: -rw-r--r-- 516 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * @test /nodynamiccopyright/
 * @bug 4347611 4440249 4508227
 * @summary Check that qualified reference to type via an expression does not crash compiler.
 * @author maddox
 *
 * @compile/fail/ref=ExprQualifiedType.out -XDrawDiagnostics ExprQualifiedType.java
 */

public class ExprQualifiedType {

    static class Nested {
        static int i;
        static void m() { i = 1; }
    }

    static void test() {
        new ExprQualifiedType().Nested.i = 1;
        new ExprQualifiedType().Nested.m();
    }
}