Thread overview
[Issue 17145] [REG2.066.0] Tuple expansion error in local enum declaration
[Issue 17145] Tuple expansion error in local enum declaration
Feb 04, 2017
Adrian Matoga
Jul 02, 2017
Vladimir Panteleev
Dec 16, 2018
Walter Bright
Dec 17, 2018
Simen Kjaeraas
Feb 08, 2020
Walter Bright
Feb 08, 2020
Walter Bright
Feb 09, 2020
Dlang Bot
Feb 09, 2020
Dlang Bot
February 04, 2017
https://issues.dlang.org/show_bug.cgi?id=17145

Adrian Matoga <epi@atari8.info> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Tuple expansion does not    |Tuple expansion error in
                   |work in local enum          |local enum declaration
                   |declaration                 |

--
July 02, 2017
https://issues.dlang.org/show_bug.cgi?id=17145

Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dlang-bugzilla@thecybershad
                   |                            |ow.net
            Summary|Tuple expansion error in    |[REG2.066.0] Tuple
                   |local enum declaration      |expansion error in local
                   |                            |enum declaration
           Severity|normal                      |regression

--- Comment #1 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
This seems to be a regression.

Introduced in https://github.com/dlang/dmd/pull/3672

--
December 16, 2018
https://issues.dlang.org/show_bug.cgi?id=17145

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> ---
Would be nice to have a test case that doesn't rely on Phobos?

--
December 17, 2018
https://issues.dlang.org/show_bug.cgi?id=17145

Simen Kjaeraas <simen.kjaras@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simen.kjaras@gmail.com

--- Comment #3 from Simen Kjaeraas <simen.kjaras@gmail.com> ---
This compiles from 2.064 to 2.071.2, and again from 2.073.2:

auto tuple(T...)(T t) {
    struct Result {
        T expand;
    }
    return Result(t);
}

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

void bar()
{
        auto roo = tuple(1, 2).expand; // OK
        pragma(msg, typeof(roo).stringof);
        pragma(msg, roo.stringof);
}

This compiles from 2.064 to 2.065.0, but fails ever since:

auto tuple(T...)(T t) {
    struct Result {
        T expand;
    }
    return Result(t);
}

void baz()
{
        enum zoo = tuple(1, 2).expand; // Error: value of __tup1847 is not
known at compile time
        pragma(msg, typeof(zoo).stringof);
        pragma(msg, zoo.stringof);
}

--
February 08, 2020
https://issues.dlang.org/show_bug.cgi?id=17145

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=11201

--
February 08, 2020
https://issues.dlang.org/show_bug.cgi?id=17145

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=14595

--
February 09, 2020
https://issues.dlang.org/show_bug.cgi?id=17145

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
@WalterBright created dlang/dmd pull request #10774 "fix Issue 17145 - [REG2.066.0] Tuple expansion error in local enum de…" fixing this issue:

- fix Issue 17145 - [REG2.066.0] Tuple expansion error in local enum declaration

https://github.com/dlang/dmd/pull/10774

--
February 09, 2020
https://issues.dlang.org/show_bug.cgi?id=17145

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #10774 "fix Issue 17145 - [REG2.066.0] Tuple expansion error in local enum de…" was merged into master:

- e1a04df28118fe1e7cf47dde26e1f896630e585a by Walter Bright:
  fix Issue 17145 - [REG2.066.0] Tuple expansion error in local enum
declaration

https://github.com/dlang/dmd/pull/10774

--