[Issue 21377] Unclear error message "delegate __lambda cannot be struct members"

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 28 17:28:41 UTC 2021


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

--- Comment #2 from bradley.chatha at gmail.com ---
I have a sneaking suspicion that this may be slightly related to one of the
underlying problems for https://issues.dlang.org/show_bug.cgi?id=21496 which is
where templated types that contain a template parameter into a struct member,
will then implicitly become embedded within the struct itself.

So the anonymous lambda inside of `S2` in the example is being "falsely"
embedded into `S2` which is causing this error, likely because the lambda is
lowered into a form of template.

--


More information about the Digitalmars-d-bugs mailing list