Spurious raw types warning when using unbound method references

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8, 8-repo-lambda
    • Component/s: tools
    • b91
    • Verified

      The following code gives an undeserved warning:

      interface Foo<X> {
          void m(List<X> lx, X x);
      }

      class Test {
          Foo<String> fs1 = List::add; //warning: List is a raw type
      }

      The warning is undeserved, as List type-parameters are being inferred from the context.

            Assignee:
            Maurizio Cimadamore
            Reporter:
            Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: