Re: copying const struct

2013-10-15 Thread Jack Applegame
On Monday, 14 October 2013 at 18:36:00 UTC, Maxim Fomin wrote: Funniest thing happen in cases like this when he reports the bug himself and soon fixes it, later bug is hit by someone else but during reporting it is realized that bug is already fixed, pull is pushed to master and everyone

Re: copying const struct

2013-10-14 Thread Benjamin Thaut
Am 14.10.2013 13:35, schrieb Jack Applegame: Why this doesn't compile? http://dpaste.dzfl.pl/21ef5b04 class Foo {} struct Bar1 { const(Foo[]) member; } struct Bar2 { const Foo member; } void main() { const Bar1 bar1; const Bar2 bar2; Bar1 b1 = bar1; // ok Bar2

copying const struct

2013-10-14 Thread Jack Applegame
Why this doesn't compile? http://dpaste.dzfl.pl/21ef5b04 class Foo {} struct Bar1 { const(Foo[]) member; } struct Bar2 { const Foo member; } void main() { const Bar1 bar1; const Bar2 bar2; Bar1 b1 = bar1; // ok Bar2 b2 = bar2; // cannot

Re: copying const struct

2013-10-14 Thread Jack Applegame
On Monday, 14 October 2013 at 11:38:23 UTC, Benjamin Thaut wrote: The line Bar2 b2 = bar2; would remove const from member Seems strange, because b2.member is const by declaration.

Re: copying const struct

2013-10-14 Thread Dicebot
On Monday, 14 October 2013 at 11:45:30 UTC, Jack Applegame wrote: On Monday, 14 October 2013 at 11:38:23 UTC, Benjamin Thaut wrote: The line Bar2 b2 = bar2; would remove const from member Seems strange, because b2.member is const by declaration. Strange indeed and smells like a bug. `auto

Re: copying const struct

2013-10-14 Thread Benjamin Thaut
Am 14.10.2013 13:54, schrieb Dicebot: On Monday, 14 October 2013 at 11:45:30 UTC, Jack Applegame wrote: On Monday, 14 October 2013 at 11:38:23 UTC, Benjamin Thaut wrote: The line Bar2 b2 = bar2; would remove const from member Seems strange, because b2.member is const by declaration. Strange

Re: copying const struct

2013-10-14 Thread Maxim Fomin
On Monday, 14 October 2013 at 11:35:32 UTC, Jack Applegame wrote: Why this doesn't compile? http://dpaste.dzfl.pl/21ef5b04 class Foo {} struct Bar1 { const(Foo[]) member; } struct Bar2 { const Foo member; } void main() { const Bar1 bar1; const Bar2

Re: copying const struct

2013-10-14 Thread Maxim Fomin
On Monday, 14 October 2013 at 13:56:58 UTC, Benjamin Thaut wrote: Am 14.10.2013 13:54, schrieb Dicebot: On Monday, 14 October 2013 at 11:45:30 UTC, Jack Applegame wrote: On Monday, 14 October 2013 at 11:38:23 UTC, Benjamin Thaut wrote: The line Bar2 b2 = bar2; would remove const from member

Re: copying const struct

2013-10-14 Thread Benjamin Thaut
Am 14.10.2013 16:19, schrieb Maxim Fomin: On Monday, 14 October 2013 at 13:56:58 UTC, Benjamin Thaut wrote: Am 14.10.2013 13:54, schrieb Dicebot: On Monday, 14 October 2013 at 11:45:30 UTC, Jack Applegame wrote: On Monday, 14 October 2013 at 11:38:23 UTC, Benjamin Thaut wrote: The line Bar2

Re: copying const struct

2013-10-14 Thread Kenji Hara
On Monday, 14 October 2013 at 14:18:10 UTC, Maxim Fomin wrote: On Monday, 14 October 2013 at 11:35:32 UTC, Jack Applegame wrote: Why this doesn't compile? http://dpaste.dzfl.pl/21ef5b04 class Foo {} struct Bar1 { const(Foo[]) member; } struct Bar2 { const Foo member;

Re: copying const struct

2013-10-14 Thread Ali Çehreli
On 10/14/2013 10:33 AM, Kenji Hara wrote: On Monday, 14 October 2013 at 14:18:10 UTC, Maxim Fomin wrote: This is compilable using git head. When I read that line ... Kenji Hara ... I was thinking about that person. :) Thank you Kenji! Ali

Re: copying const struct

2013-10-14 Thread Maxim Fomin
On Monday, 14 October 2013 at 17:38:22 UTC, Ali Çehreli wrote: On 10/14/2013 10:33 AM, Kenji Hara wrote: On Monday, 14 October 2013 at 14:18:10 UTC, Maxim Fomin wrote: This is compilable using git head. When I read that line ... Kenji Hara ... I was thinking about that person. :) Thank