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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 11 03:32:25 UTC 2020


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

--- Comment #1 from bradley.chatha at gmail.com ---
Relevant quote from the forums: "The actual problem is that the compiler isn't
able to figure out the type of the lambda you've provided. If you change the
argument to `(string str)`, it'll work.

The real question is, why does type inference fail for the UDA when it works
for the normal constructor call?"

--


More information about the Digitalmars-d-bugs mailing list