Bug 22217 – Can't use redundant parens around function

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2021-08-16T18:38:09Z
Last change time
2023-07-16T14:53:04Z
Assigned to
No Owner
Creator
Ate Eskola

Comments

Comment #0 by Ajieskola — 2021-08-16T18:38:09Z
``` int f(int x){return x+5;} auto gVar= (f)(5); ``` results in `Error: C style cast illegal, use cast(f)5`. This should parse as a call of `f` with argument `5`, not as a cast attempt.
Comment #1 by nick — 2023-07-16T14:53:04Z
*** This issue has been marked as a duplicate of issue 24025 ***