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

RazvanN <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |WONTFIX

--- Comment #1 from RazvanN <[email protected]> ---
Unfortunately, I don't think this can be fixed. Once you have `()` the compiler
expects an expression. If you have a type, it simply treats the expression as a
cast. However, the parser does not exactly if you have a type or not inside the
params, it just checks what's next after `)`. I tried fixing it by checking
whether after `)` we have a left bracket (`[`) [1], but that is not enough,
because we need more context than this (namely, we need to know if we had a
type or not inside the parens, but that is available only at semantic time).

That is why I think that this is WONTFIX bug report.

[1] https://github.com/dlang/dmd/pull/14544

--

Reply via email to