Spurious checked exception errors in nested method call

XMLWordPrintable

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

      The following program does not compile:

      import java.util.*;

      class Test {
      Callable<Number> tasks = id(id(()->{ if (true) throw new java.io.IOException(); else return 0; }));

      <Z> Z id(Z z) { return null; }

      }


      However, if the outer 'id' call is removed, the program compiles.

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

              Created:
              Updated:
              Resolved: