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

Code generation crash with lambda and local classes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8
    • 8
    • tools
    • None
    • b82
    • Verified

    Description

      The following code crashes javac

      interface SAM {
          Object m();
      }

      class Test {
          static void test(String s) {
              class Foo {
                   void m() {
                        Object o = s;
                   }
               }
           SAM s2 = ()->new Foo(); }
      }

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: