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

typedef of anonymous struct generates a redundant class

XMLWordPrintable

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

      Consider this code:

      typedef struct { int x; int y; } Point

      This generates two classes:

      * Point$0 (the anonymous struct)
      * Point (a typedef to the anonymous struct)

      While this is technically correct, this idiom is so common that we should just emit a single struct class. In fact, this was already the case before we tweaked the jextract implementation.

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

              Created:
              Updated:
              Resolved: