inference of thrown variable does not work correctly

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: tools
    • b134
    • Verified

      This example doesn't compile:

      nterface ThrowableRunnable<E extends Throwable> {
          void compute() throws E;
      }

      public abstract class Overloads {

          public abstract < E extends Exception> void computeException(ThrowableRunnable<E> process) throws E;


          public static <T, E extends Throwable> T compute(ThrowableRunnable<E> action) throws E {
              return null;
          }

          {
              computeException(() -> compute(() -> {}));
          }
      }

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

              Created:
              Updated:
              Resolved: