[Issue 15908] Implicitly typed lambda inside class "has no value"
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Aug 14 09:04:30 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=15908
greensunny12 at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |greensunny12 at gmail.com
--- Comment #2 from greensunny12 at gmail.com ---
Uranuz from D.learn also hit this bug - in his/her case for structs:
http://forum.dlang.org/post/noq45h$lgu$1@digitalmars.com
struct A
{
import std.algorithm: map;
import std.array: array;
import std.typecons: tuple;
static immutable aaa = [
tuple("1", "one"),
tuple("2", "two"),
tuple("3", "three")
];
static immutable bbb = aaa.map!( a => a[0] ).array;
}
void main()
{
A a = A();
}
//---------
Compilation output:
/opt/compilers/dmd2/include/std/algorithm/iteration.d(455): Error:
this.__lambda6 has no value
> I'm pretty sure it's ctfe specific.
On DMD nightly you even get a better error message saying that am error during
CTFE happened :/
--
More information about the Digitalmars-d-bugs
mailing list