When a method reference to a local class constructor is contained in a method whose number of parameters matches the number of constructor parameters compilation fails

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 8
    • Affects Version/s: 8
    • Component/s: tools
    • None
    • 8
    • b91
    • generic
    • generic
    • Verified

      Nonsensical errors like the following occur:

      error: constructor BoxingAdapter in class BoxingAdapter cannot be applied to given types;
        required: Consumer<Integer>
        found: Supplier<OfInt>
        reason: argument mismatch; Supplier<OfInt> cannot be converted to Consumer<Integer>
      1 error

      Which is generated by the attached SpliteratorTestHelper.java

        1. SpliteratorTestHelper.java
          25 kB
          Robert Field
        2. TreeMakerParamsIsGoofy.java
          0.3 kB
          Robert Field

            Assignee:
            Robert Field (Inactive)
            Reporter:
            Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: