https://issues.dlang.org/show_bug.cgi?id=12101
Vladimir Panteleev <dlang-bugzi...@thecybershadow.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid CC| |dlang-bugzilla@thecybershad | |ow.net Summary|[CTFE] false error, seems |[CTFE] Can't return struct |to be related to lambda |with closure during CTFE |capture in MapResult | --- Comment #1 from Vladimir Panteleev <dlang-bugzi...@thecybershadow.net> --- (In reply to Martin Nowak from comment #0) > Sorry, it's not very reduced, but I don't have time to do this right now. Reduced: //////////////// test.d //////////////// auto makeBox(int value) { struct Box { int getValue() { return value; } } return Box(); } enum value = makeBox(1).getValue(); //////////////////////////////////////// Looks like there is an issue returning closure structs in CTFE. --