[Issue 21377] New: Unclear error message "delegate __lambda cannot be struct members"
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 11 03:28:31 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21377
Issue ID: 21377
Summary: Unclear error message "delegate __lambda cannot be
struct members"
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: bradley.chatha at gmail.com
The following code produces an error (possible bug?) with a very confusing and
unclear message:
struct S
{
bool delegate(string) f;
}
@S(str => true) // VALID
int a;
S s = S(str => true); // VALID
struct S2
{
@S(str => false) // INVALID
int a;
}
// Error: delegate onlineapp.S2.__lambda2 cannot be struct members
--
More information about the Digitalmars-d-bugs
mailing list