Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8178150

Regression in logic for handling inference stuck constraints

XMLWordPrintable

    • b19
    • Verified

        The following program doesn't compile (reported by JetBrains):

        import java.util.*;
        import java.util.function.*;
        import java.util.logging.*;

        class CompilerBugReport
        {
            private final static Logger LOGGER = null;

            public static void test(List<List<String>> testList) {
                testList.forEach(CompilerBugReport.bind(cast(LOGGER::info), iterable -> ""));
            }

            private static <T1, T2> TestProcedure<T1, T2> bind(Consumer<T2> delegate, Function<? super T1, T2> function) {
                return null;
            }

            private static <C> Consumer<C> cast(Consumer<C> consumer) {
                return consumer;
            }

            private static final class TestProcedure<X1, X2> implements Consumer<X1> {
                @Override
                public void accept(final X1 t1) { }
            }

        }

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

                Created:
                Updated:
                Resolved: