D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17143 - [REG2.072.0] Declaration is already defined on global enum = tuple(...).expand declaration
Summary: [REG2.072.0] Declaration is already defined on global enum = tuple(...).expa...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 regression
Assignee: Adrian Matoga
URL:
Keywords: CTFE, rejects-valid
Depends on:
Blocks:
 
Reported: 2017-02-04 11:45 UTC by Adrian Matoga
Modified: 2017-02-24 20:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Adrian Matoga 2017-02-04 11:45:04 UTC
// The following code compiled successfully up to 2.071.2:

import std.typecons : tuple;
enum foo = tuple(1, 2).expand;
pragma(msg, typeof(foo).stringof);
pragma(msg, foo.stringof);

// Result up to 2.071.2:
// (int, int)
// tuple(1, 2)

// From 2.072.0 on:
// tup.d(2): Error: declaration tup.__tup1846 is already defined
// tup.d(3):        while evaluating pragma(msg, (_error_).stringof)
// tup.d(4):        while evaluating pragma(msg, foo.stringof)
Comment 1 github-bugzilla 2017-02-04 17:30:06 UTC
Commits pushed to stable at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/555a9a1f5e105b6e815b0a54218de04e36289e38
Fix Issue 17143 - [REG2.072.0] Declaration is already defined on global enum = tuple(...).expand declaration

Regression was introduced in 53a70e4d66b8bf1b96a51c06eeb2df7fa836f647

https://github.com/dlang/dmd/commit/093a53aa46e41da58525cc556e071c1ae3d46c84
Merge pull request #6517 from epi/fix-17143

Fix Issue 17143 - [REG2.072.0] Declaration is already defined on global enum = tuple(...).expand declaration
Comment 2 github-bugzilla 2017-02-11 20:50:37 UTC
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/555a9a1f5e105b6e815b0a54218de04e36289e38
Fix Issue 17143 - [REG2.072.0] Declaration is already defined on global enum = tuple(...).expand declaration

https://github.com/dlang/dmd/commit/093a53aa46e41da58525cc556e071c1ae3d46c84
Merge pull request #6517 from epi/fix-17143
Comment 3 github-bugzilla 2017-02-24 20:34:34 UTC
Commits pushed to newCTFE at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/555a9a1f5e105b6e815b0a54218de04e36289e38
Fix Issue 17143 - [REG2.072.0] Declaration is already defined on global enum = tuple(...).expand declaration

https://github.com/dlang/dmd/commit/093a53aa46e41da58525cc556e071c1ae3d46c84
Merge pull request #6517 from epi/fix-17143