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

Jextract can not handle multiple fields with inline type declarations that have the same name

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3
    • None
    • repo-panama
    • tools

    Description

      For instance this header file:

          struct Foo {
              struct {
                  int x;
                  int y;
              } x;
          };

          struct Bar {
              struct {
                  int z;
              } x;
          };

      jextract running in source mode will only generate one layout field:

          static final MemoryLayout x$struct$LAYOUT_ = MemoryLayout.ofStruct(
              C_INT.withName("x"),
              C_INT.withName("y")
          );

      That is then referenced for both fields.

      While the fields have the same names, the layouts are unrelated, so 2 layouts should be generated.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jvernee Jorn Vernee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: