Bug 19240 – std.typecons.Tuple should check for reserved identifiers
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-09-11T08:56:11Z
Last change time
2018-09-20T17:42:59Z
Assigned to
No Owner
Creator
John Colvin
Comments
Comment #0 by john.loughran.colvin — 2018-09-11T08:56:11Z
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....