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

Empty fragment when reporting method resolution ambiguity error in JShell

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • tools
    • None

      A small artifact of error reporting in JShell. Maybe it can be fine tuned to provide a grammatically correct error (in "___", that name is empty) .

      jshell> void m(String s) { } // 1
         ...> void m(Number n) { }
      | created method m(String)
      | created method m(Number)

      jshell> m(null) // ambiguous
         ...>
      | Error:
      | reference to m is ambiguous
      | both method m(java.lang.Number) in and method m(java.lang.String) in match
      | m(null) // ambiguous
      | ^

            jlahoda Jan Lahoda
            abimpoudis Angelos Bimpoudis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: