Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7903612

Nested struct typedefs fail to compile

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • None
    • tools
    • None

      Consider this C header:

      ```
      struct Outer {
          struct Inner { int x; } a;
      };

      typedef struct Inner T;
      ```

      The generated code for T is like this:

      ```
      public class T extends Outer.Inner { ... }
      ```

      This is all good, but Outer.Inner is final:

      ```
      public class Outer {
          ...
          public static class Inner { ... }
      }
      ```

      So this program will fail to compile.

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

              Created:
              Updated:
              Resolved: