On 7/9/2014 1:58 PM, Brian Schott wrote:
On Wednesday, 9 July 2014 at 20:11:46 UTC, Walter Bright wrote:
What the parser can do is do a lookahead on the ( ) to see if it matches the
'BasicType Identifier' grammar. Parser::isDeclaration() can be pressed into
service to do that. This should resolve the issue without breaking code.

There are 25 instances of code that does not follow the "BasicType Identifier"
syntax for CatchParameter in Phobos alone.

Interesting. Those are invalid D code, but obviously the compiler is accepting 
it.

I suggest recognizing in the parser:

   ( Identifier )

as a special case, in addition to using Parser::isDeclaration(). Gradually we can turn that special case into a warning, then deprecation.

Reply via email to