Bug 17143 – [REG2.072.0] Declaration is already defined on global enum = tuple(...).expand declaration
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2017-02-04T11:45:00Z
Last change time
2017-02-24T20:34:34Z
Keywords
CTFE, rejects-valid
Assigned to
adrian
Creator
adrian
Comments
Comment #0 by adrian — 2017-02-04T11:45:04Z
// 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 by github-bugzilla — 2017-02-04T17:30:06Z