Bug 22625 – ImportC: original name of typedefed struct not visible in D when compiling separately
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-12-23T07:50:35Z
Last change time
2022-02-02T10:31:24Z
Keywords
ImportC, pull
Assigned to
No Owner
Creator
duser
Comments
Comment #0 by duser — 2021-12-23T07:50:35Z
cmodule.c:
---
typedef struct data_s {
int x;
} data_t;
---
dmodule.d:
---
import cmodule : data_s, data_t;
---
compile using "dmd -c dmodule.d" and get this:
dmodule.d(1): Error: module `cmodule` import `data_s` not found, did you mean alias `cmodule.data_t`?
if the C file is added to the command line like "dmd -c dmodule.d cmodule.c", then the error goes away
version: DMD64 D Compiler v2.098.0-361-g415e58e6d
Comment #1 by dlang-bot — 2022-02-02T09:43:01Z
@WalterBright created dlang/dmd pull request #13603 "fix Issue 22625 - ImportC: original name of typedefed struct not visi…" fixing this issue:
- fix Issue 22625 - ImportC: original name of typedefed struct not visible in D when compiling separately
https://github.com/dlang/dmd/pull/13603
Comment #2 by dlang-bot — 2022-02-02T10:31:24Z
dlang/dmd pull request #13603 "fix Issue 22625 - ImportC: original name of typedefed struct not visi…" was merged into master:
- 51e281d75879782259f61af69bc959531031e1c8 by Walter Bright:
fix Issue 22625 - ImportC: original name of typedefed struct not visible in D when compiling separately
https://github.com/dlang/dmd/pull/13603