Thread overview
2.085-beta / nightly regression uda inside union breaks default initialization
Feb 16, 2019
Juraj Mojzis
Feb 16, 2019
Basile B.
Feb 16, 2019
Juraj Mojzis
Feb 16, 2019
Eugene Wissner
Feb 16, 2019
Seb
February 16, 2019
Hi,
i would like to report an issue here, as I'm unable to create an account on Bugzilla.

---
import std.stdio;
struct V4_UDA(T) {
    enum N = 4;

    union {
        @("BRAKE_ME") T[N] v = 0;
        struct { T x, y, z, w; }
    }

    this(T vx, T vy, T vz, T vw) {
        x = vx; y = vy; z = vz; w = vw;
    }
}


alias v4_broken = V4_UDA!(float);

struct OMG {
    v4_broken broken = v4_broken(1.0f, 2.0f, 3.0f, 4.0f);
}

void main()
{
    OMG omg;
    writeln(omg.broken.v, "!!!");
}
---

prints:
[0, 0, 0, 0]!!!


run.dlang.io:
https://run.dlang.io/is/aXXYWH



February 16, 2019
On Saturday, 16 February 2019 at 13:32:12 UTC, Juraj Mojzis wrote:
> Hi,
> i would like to report an issue here, as I'm unable to create an account on Bugzilla.
>
> ---
> import std.stdio;
> struct V4_UDA(T) {
>     enum N = 4;
>
>     union {
>         @("BRAKE_ME") T[N] v = 0;
>         struct { T x, y, z, w; }
>     }
>
>     this(T vx, T vy, T vz, T vw) {
>         x = vx; y = vy; z = vz; w = vw;
>     }
> }
>
>
> alias v4_broken = V4_UDA!(float);
>
> struct OMG {
>     v4_broken broken = v4_broken(1.0f, 2.0f, 3.0f, 4.0f);
> }
>
> void main()
> {
>     OMG omg;
>     writeln(omg.broken.v, "!!!");
> }
> ---
>
> prints:
> [0, 0, 0, 0]!!!
>
>
> run.dlang.io:
> https://run.dlang.io/is/aXXYWH

Because of a IRC #d discussion:

Note that Juraj Mojzis was not able to post the bug report on bugzilla because his email host is banned or something. So the point of the post is

1. Someone can create the bug report
2. Maybe the test can be minimized
3. Maybe someone can make a fix to avoid that the regression got shipped in 2.085
February 16, 2019
The registration email took some time, but arrived at the end.
I have submitted an issue for the regresion.

Juraj
February 16, 2019
On Saturday, 16 February 2019 at 16:17:28 UTC, Juraj Mojzis wrote:
> The registration email took some time, but arrived at the end.
> I have submitted an issue for the regresion.
>
> Juraj

Should be greylisting.
February 16, 2019
On Saturday, 16 February 2019 at 16:17:28 UTC, Juraj Mojzis wrote:
> The registration email took some time, but arrived at the end.
> I have submitted an issue for the regresion.
>
> Juraj

Don't forget to post the link here, s.t. other people have an easier time following up:

https://issues.dlang.org/show_bug.cgi?id=19680