jextract can't handle multiple extern declarations that have the same name, but a different type name

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • None
    • Affects Version/s: repo-panama
    • Component/s: tools

      For the following header:

          typedef int MyInt;

          extern const int x;
          extern const MyInt x;

      Extracting results in errors like:

          java.lang.RuntimeException: In memory compilation failed: warning: using incubating module(s): jdk.incubator.foreign
          org/jextract/test_h.java:29: error: method x$LAYOUT() is already defined in class test_h
              public static MemoryLayout x$LAYOUT() {
                                                           ^

      Note that if chaning MyInt to int for the second declaration makes it work.

            Assignee:
            Jorn Vernee
            Reporter:
            Jorn Vernee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: