Bug 22927 – importC: 'struct already exists' with forward reference and function with same name

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-03-25T12:08:10Z
Last change time
2022-03-31T08:11:41Z
Keywords
ImportC, pull
Assigned to
No Owner
Creator
duser

Comments

Comment #0 by duser — 2022-03-25T12:08:10Z
struct block *tmp; struct block {}; void block(void); void block(void){} test.c(2): Error: struct `test.block` already exists at test.c(1). Perhaps in another function with the same name?
Comment #1 by dlang-bot — 2022-03-31T05:28:38Z
@WalterBright created dlang/dmd pull request #13931 "fix Issue 22927 - importC: 'struct already exists' with forward refer…" fixing this issue: - fix Issue 22927 - importC: 'struct already exists' with forward reference and function with same name https://github.com/dlang/dmd/pull/13931
Comment #2 by dlang-bot — 2022-03-31T08:11:41Z
dlang/dmd pull request #13931 "fix Issue 22927 - importC: 'struct already exists' with forward refer…" was merged into master: - 42047a8ba511e062f34429e1db7b191e64365d2f by Walter Bright: fix Issue 22927 - importC: 'struct already exists' with forward reference and function with same name https://github.com/dlang/dmd/pull/13931