www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19240] New: std.typecons.Tuple should check for reserved

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

          Issue ID: 19240
           Summary: std.typecons.Tuple should check for reserved
                    identifiers
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: john.loughran.colvin gmail.com

e.g.

import std.typecons : Tuple;
Tuple!(int, "function") a;

/dlang/dmd/linux/bin64/../../src/phobos/std/typecons.d-mixin-613(613): Error:
basic type expected, not function
/dlang/dmd/linux/bin64/../../src/phobos/std/typecons.d-mixin-613(613): Error:
found = when expecting (
/dlang/dmd/linux/bin64/../../src/phobos/std/typecons.d-mixin-613(613): Error:
found ; when expecting )
/dlang/dmd/linux/bin64/../../src/phobos/std/typecons.d-mixin-613(613): Error:
no identifier for declarator _error_ function(_0LU)
/dlang/dmd/linux/bin64/../../src/phobos/std/typecons.d-mixin-613(613): Error:
semicolon expected to close alias declaration
onlineapp.d(3): Error: template instance `std.typecons.Tuple!(int, "function")`
error instantiating

Not the best error message....

--
Sep 11 2018