Details

    • Type: Sub-task
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b68
    • Verification:
      Verified

      Description

      A generic functional descriptor should be a legal target for a method reference. The following code should compile:


      interface F {
      <X> void m(X x);
      }

      class Test {
      <Z> void g(Z z) { ... }

      void test() {
      F f = this::g;
      f.m(1); //ok X inferred as Integer
      f.m(""); //ok X inferred as String
      }
      }

      Note: generic methods are still _not_ legal target for lambda expressions, as per EDR.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: