www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23002] New: importC: struct or union field with same name as

https://issues.dlang.org/show_bug.cgi?id=23002

          Issue ID: 23002
           Summary: importC: struct or union field with same name as type
                    gives circular reference error
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ImportC, rejects-valid
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: duser neet.fi
                CC: duser neet.fi

typedef int x;
struct S { x x; };
union U { x x; };

test.c(2): Error: circular reference to variable `test.S.x`
test.c(3): Error: circular reference to variable `test.U.x`

--
Apr 10 2022