Thread overview
[Issue 17547] Compile-time map!(...) fails to compile inside a struct when using lambdas ("this.__lambda1 has no value")
Jun 24, 2017
Alexandre Bléron
Apr 11, 2019
asumface@gmail.com
Dec 17, 2022
Iain Buclaw
June 24, 2017
https://issues.dlang.org/show_bug.cgi?id=17547

Alexandre Bléron <alex.bleron@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86                         |x86_64
           Severity|enhancement                 |normal

--
April 11, 2019
https://issues.dlang.org/show_bug.cgi?id=17547

asumface@gmail.com changed:

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

--- Comment #1 from asumface@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
}

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

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--