XMLWordPrintable

Details

    • Sub-task
    • Resolution: Fixed
    • P3
    • 8
    • 8
    • tools
    • None
    • b68
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: