https://issues.dlang.org/show_bug.cgi?id=22102

--- Comment #1 from Iain Buclaw <ibuc...@gdcproject.org> ---
Similar to issue 21992.


While the rewrite could be handled by DeclarationExp semantic.  There's no way
to know that the original declaration had parenthesis around the variable name.
 e.g: If `e.declaration.type` resolves as a function declaration, how do we
know whether the original code was `fn(p);` or `fn p;`?

It's probably safer to first assume CallExp in CParser, as that's the most
common usage of the ambiguous syntax.  If `fn` is then found to be a type,
rewrite it into a DeclarationExp.

--

Reply via email to