digitalmars.D.bugs - [Issue 24303] New: anonymous struct problems when typedef'd in
- d-bugmail puremagic.com (45/45) Dec 26 2023 https://issues.dlang.org/show_bug.cgi?id=24303
https://issues.dlang.org/show_bug.cgi?id=24303 Issue ID: 24303 Summary: anonymous struct problems when typedef'd in separate C files Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: bugzilla digitalmars.com Dennis 2023-12-12 23:04:37 UTC submitted: Another example: (not sure if it's the same bug) a.c ```C typedef struct {} Slice; struct Lang { Slice *slices; }; ``` b.c ```C typedef struct {} Slice; struct Lang { Slice *slices; }; void langmap(struct Lang *self) { Slice slice = *self->slices; } ``` ``` dmd a.c // works dmd b.c // works dmd b.c a.c // works dmd a.c b.c // fails: b.c(11): Error: cannot implicitly convert expression `*(*self).slices` of type `__tag2` to `__tag3` ``` --
Dec 26 2023