Bug 22233 – importC: (identifier)() incorrectly parsed as a cast-expression

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-08-23T04:42:33Z
Last change time
2021-09-07T09:56:17Z
Keywords
ImportC, pull, rejects-valid
Assigned to
No Owner
Creator
dave287091

Comments

Comment #0 by dave287091 — 2021-08-23T04:42:33Z
The following fails to compile: void foo(void){} int main(void){ (foo)(); return 0; } foo.i(3): Error: expression expected, not `)` foo.i(3): Error: found `;` when expecting `)` foo.i(4): Error: found `return` when expecting `;` following statement
Comment #1 by dlang-bot — 2021-09-07T08:20:24Z
@WalterBright created dlang/dmd pull request #13052 "fix Issue 22233 - importC: (identifier)() incorrectly parsed as a cas…" fixing this issue: - fix Issue 22233 - importC: (identifier)() incorrectly parsed as a cast-expression https://github.com/dlang/dmd/pull/13052
Comment #2 by dlang-bot — 2021-09-07T09:56:17Z
dlang/dmd pull request #13052 "fix Issue 22233 - importC: (identifier)() incorrectly parsed as a cas…" was merged into master: - d33ac6f94a110ed63cec5377a6bb21e4e6c39c46 by Walter Bright: fix Issue 22233 - importC: (identifier)() incorrectly parsed as a cast-expression https://github.com/dlang/dmd/pull/13052