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

[lworld] Javac generates duplicated initializer code

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • repo-valhalla
    • repo-valhalla
    • tools

      for code like:

      ```
      value class Test {
          static class Foo {
              int x;
              int getX() { return x; }
          }
          private final Foo data = new Foo();
          Test() {
              data.getX();
              super();
          }
      }
      ```

      javac generates the initialization: `data = new Foo();` twice at the beginning of the constructor. Once by the algo that generates local proxies and another one by the normalization code in Gen.

            vromero Vicente Arturo Romero Zaldivar
            vromero Vicente Arturo Romero Zaldivar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: