[Issue 7061] delegates sometimes cannot be used in struct initializers

2020-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7061

Basile-z  changed:

   What|Removed |Added

 CC|b2.t...@gmx.com |

--


[Issue 7061] delegates sometimes cannot be used in struct initializers

2019-07-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7061

Basile-z  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||b2.t...@gmx.com
 Resolution|--- |WORKSFORME

--- Comment #3 from Basile-z  ---
struct S{ void delegate() dg; }
struct T{ int delegate() dg; }

int x;
S a = {{}};  // ok
S b = {{;}}; // ok
S c = {{x=0;}};  // ok
T d = {{return 0;}}; // ok

void main(){
int g;
S x1 = {{}};// ok
S y = {{;}};// ok
S z = {{x=0;}}; // ok
T w = {{return 0;}};// ok
}

--


[Issue 7061] delegates sometimes cannot be used in struct initializers

2017-07-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7061

--- Comment #2 from timon.g...@gmx.ch ---
(In reply to Vladimir Panteleev from comment #1)
> Timon, fairly sure that's not the entire program. What's the definition of S?

Oops. Thanks! The entire program:

struct S{ void delegate() dg; }
struct T{ int delegate() dg; }

int x;
S a = {{}};  // fail
S b = {{;}}; // fail
S c = {{x=0;}};  // fail
T d = {{return 0;}}; // fail

void main(){
S x = {{}};  // ok
S y = {{;}}; // fail
S z = {{x=0;}};  // fail
T w = {{return 0;}}; // fail
}

--


[Issue 7061] delegates sometimes cannot be used in struct initializers

2017-07-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7061

Vladimir Panteleev  changed:

   What|Removed |Added

 CC||dlang-bugzilla@thecybershad
   ||ow.net

--- Comment #1 from Vladimir Panteleev  ---
Timon, fairly sure that's not the entire program. What's the definition of S?

--