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

Bad nested names are sometimes attached to structs

XMLWordPrintable

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

      Consider this code:

      ```
      typedef struct tagFoo Foo;

      struct Bar {
          int x;
      };

      typedef struct tagFoo {
          struct Bar bar;
      } Foo;
      ```

      This generates an invalid layout for tagFoo:

      ```
      private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
              tagFoo.Bar.$LAYOUT().withName("bar")
          ).withName("tagFoo");
      ```

      Note how this refers to tagFoo.Bar, which looks like a nested class, but in reality jextract has generated a toplevel Bar.

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

              Created:
              Updated:
              Resolved: