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....
Comment #1 by simen.kjaras — 2018-09-18T08:14:23Z
This is caused by a typo in distinctFieldNames. PR: https://github.com/dlang/phobos/pull/6712
Comment #2 by github-bugzilla — 2018-09-20T17:42:58Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/ad8361b369a2c63d5b2c5c47edf948164692cc2d Fix issue 19240 - std.typecons.Tuple should check for reserved identifiers https://github.com/dlang/phobos/commit/60c801872db658d256047bd6396c733151f86314 Merge pull request #6712 from Biotronic/Issue-19240 Fix issue 19240 - std.typecons.Tuple should check for reserved identi… merged-on-behalf-of: Sebastian Wilzbach <[email protected]>