www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - 2.085-beta / nightly regression uda inside union breaks default

reply Juraj Mojzis <zero vec4.xyz> writes:
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
Feb 16
next sibling parent Basile B. <b2.temp gmx.com> writes:
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
Feb 16
prev sibling parent reply Juraj Mojzis <zero vec4.xyz> writes:
The registration email took some time, but arrived at the end.
I have submitted an issue for the regresion.

Juraj
Feb 16
next sibling parent Eugene Wissner <belka caraus.de> writes:
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.
Feb 16
prev sibling parent Seb <seb wilzba.ch> writes:
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
Feb 16