test/tools/javac/diags/DiagnosticRewriterTest.java

Thu, 07 Jan 2016 08:45:19 +0000

author
sadayapalam
date
Thu, 07 Jan 2016 08:45:19 +0000
changeset 3005
0353cf89ea96
permissions
-rw-r--r--

8145466: javac: No line numbers in compilation error
Summary: Compiler should not use the syntax tree from enclosing contexts in diagnostics even when the enclosing contexts are consulted for method lookup.
Reviewed-by: mcimadamore

     1 /*
     2  * @test /nodynamiccopyright/
     3  * @bug 8145466 8146533
     4  * @summary javac: No line numbers in compilation error
     5  * @compile/fail/ref=DiagnosticRewriterTest.out -Xdiags:compact -XDrawDiagnostics DiagnosticRewriterTest.java
     6  */
     8 class DiagnosticRewriterTest {
     9    void test() {
    10       new Object() {
    11          void g() {
    12             m(2L);
    13          }
    14       };
    15    }
    17    void m(int i) { }
    18 }

mercurial