if(arr) now a warning

Daniel Kozak via Digitalmars-d digitalmars-d at puremagic.com
Fri May 1 01:40:46 PDT 2015


On Fri, 01 May 2015 00:12:53 +0000
deadalnix via Digitalmars-d <digitalmars-d at puremagic.com> wrote:

> On Thursday, 30 April 2015 at 23:12:18 UTC, Daniel Kozak wrote:
> > OK so, please revert this one:
> > https://github.com/D-Programming-Language/dmd/commit/2869ee9c1fb64f08b51d8d07ce72701dda4a6fae
> >
> 
> 
> WAT ?
> 
> > and this one:
> > http://forum.dlang.org/thread/ibupwrwsgjvrjwabhmjd@forum.dlang.org
> 
> I'm not sure I get the details of that one, would you mind to sum 
> up the crux of the issue ?

struct S {
    immutable A = 5;
    int x;
}

int main() {

    S s;
    assert(s.sizeof == s.x.sizeof);
    assert(s.sizeof == s.x.sizeof + s.A.sizeof);
    return 0;
}

before 2.067:
core.exception.AssertError at test.d(12): Assertion failure

after 2.067:
core.exception.AssertError at test.d(11): Assertion failure



I do not want to change any of the issue above, I just do not understand why
some breaking changes are OK, and some other are not so ok.


More information about the Digitalmars-d mailing list