On Monday, 30 May 2016 at 19:06:53 UTC, ArturG wrote:
does this count?

struct Foo
{
    int x;
    float f;
}

void main()
{
    Foo foo;
    if(foo is typeof(foo).init) "A: does'nt work".writeln;
    foo = Foo();
    if(foo is typeof(foo).init) "B: works".writeln;
}

This one is a bug in DMD. It works correctly with LDC.

`Foo()` is supposed to be identical to `Foo.init`.

File here:
https://issues.dlang.org/show_bug.cgi?id=16105

Reply via email to