Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8020286

Wrong diagnostic after compaction

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 8
    • 8, 8-repo-lambda
    • tools
    • b100
    • Verified

      Compiling this example:

      class Test {
         void m(String s) { }
         void m(Integer i, String s) { }
         void test() {
      m(1, 1);
         }
      }

      Gives the following simplified message:

      Test.java:608: error: method m in class Test cannot be applied to given types;
      m(1, 1);
      ^
        required: String
        found: int,int
        reason: actual and formal argument lists differ in length
      Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output

      This is not good, as the simplified diagnostic is showing the wrong method!

            mcimadamore Maurizio Cimadamore
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: