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

program fails with LambdaConversionException at execution time

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 16
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b31

      Backports

        Description

        this program:

        import java.util.stream.*;

        public class Test {
          interface I {}
          static abstract class C { }
          static class A extends C implements I { }
          static class B extends C implements I { }

          static String f(I i) { return null; }

          public static void main(String[] args) {
            Stream.of(new A(), new B())
              .map(Test::f)
              .forEach(System.out::println);
          }
        }

        is accepted by the compiler but fails with LCE at execution time. Reported at: http://mail.openjdk.java.net/pipermail/compiler-dev/2018-October/012569.html

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                vromero Vicente Arturo Romero Zaldivar
                Reporter:
                vromero Vicente Arturo Romero Zaldivar
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: