[Issue 18199] Error with lambda in struct initializer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 18 08:15:02 UTC 2018


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

--- Comment #4 from John Belmonte <john at neggie.net> ---
The problem stems from the presence of the "return" token in the lambda
expression, not the curly brackets.

parseInitializer() scans ahead to see if there is a struct initializer (in
curly brackets).  However the scan is aborted when the return token is hit.

https://github.com/dlang/dmd/blob/4244b8b1abea8ad26941c33464780a13f554b0bf/src/dmd/parse.d#L6043

--


More information about the Digitalmars-d-bugs mailing list