Skip to content

Commit

Permalink
fix Issue 11427 - anonymous unions break structs in @safe code
Browse files Browse the repository at this point in the history
  • Loading branch information
9rnsr committed Dec 16, 2013
1 parent a293298 commit 090abe1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/runnable/structlit.d
Expand Up @@ -1239,6 +1239,26 @@ void test11269()
Atom a2 = {i:1, rest:10, b:2};
}

/********************************************/
// 11427

struct S11427
{
union
{
ubyte a;
int x;
}
void[] arr;
}

int foo11427() @safe
{
S11427 s1 = S11427();
S11427 s2;
return 0;
}

/********************************************/

int main()
Expand Down

0 comments on commit 090abe1

Please sign in to comment.