[Issue 17547] Compile-time map!(...) fails to compile inside a struct when using lambdas ("this.__lambda1 has no value")

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 11 18:09:56 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=17547

asumface at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |asumface at gmail.com

--- Comment #1 from asumface at gmail.com ---
Adding a test case:

import std.algorithm;

enum a = [1.0].map!(n => n); // works

struct Foo()
{
    enum b = [1.0].map!(n => n); // identical line
}

void main()
{
    pragma(msg, a);
    pragma(msg, Foo!().b); // instantiation fails
}

--


More information about the Digitalmars-d-bugs mailing list