[Issue 22217] New: Can't use redundant parens around function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Aug 16 18:38:09 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22217
Issue ID: 22217
Summary: Can't use redundant parens around function
Product: D
Version: D2
Hardware: x86
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: Ajieskola at gmail.com
```
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.
--
More information about the Digitalmars-d-bugs
mailing list