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

Fix method reference parser support in order to avoid ambiguities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 8
    • 8
    • tools
    • b19
    • unknown
    • generic
    • Verified

      The initial support for method reference parsing contained did not handle well an ambiguity between unbound method references and binary expression:

      class Test {
         void test() { that(i < len, "oopmap"); }
         void that(int i, String s) { };
      }

      The above code failed to compile, as the compiler tried to parse the sequence 'i' '<' 'len' as an unbound method reference (whose qualifier is a generic type).

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: