Identifier right after a template Type

Nick Treleaven nick at geany.org
Thu Jun 22 16:08:06 UTC 2023


On Thursday, 22 June 2023 at 07:49:31 UTC, Puneet Goel wrote:
> ```D
> class Bar {
>   Foo!q{foo}bb;
>   Foo!q{foo}cc;
> }
> ```

 From bugzilla:

     Foo!2LUNGS; // declare variable `NGS`

The PR also catches:

     Foo!0xFeedme; // variable `me`
     @0xFeedObject var; // has type Object

If we don't error on those, we can't add new type suffixes for 
literals in future without breaking code. I think that is a 
strong argument to do it.


More information about the Digitalmars-d mailing list