langtools/test/tools/javac/diags/DiagnosticRewriterTest.java
author sadayapalam
Tue, 22 Dec 2015 16:37:52 +0530
changeset 34854 d90aa0a83be4
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

/*
 * @test /nodynamiccopyright/
 * @bug 8145466
 * @summary javac: No line numbers in compilation error
 * @compile/fail/ref=DiagnosticRewriterTest.out -Xdiags:compact -XDrawDiagnostics DiagnosticRewriterTest.java
 */

class DiagnosticRewriterTest {
   void test() {
      new Object() {
         void g() {
            m(2L);
         }
      };
   }

   void m(int i) { }
}