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

Code generation crash with lambda and local classes

XMLWordPrintable

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

      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(); }
      }

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

              Created:
              Updated:
              Resolved: