Comment #0 by dlang-bugzilla — 2014-08-15T23:08:30Z
////// test.d /////
import std.variant;
struct S {}
Variant value();
void test()
{
value.get!S;
}
///////////////////
This is a Phobos regression which uncovered a DMD ICE;
introduced in: https://github.com/D-Programming-Language/phobos/pull/2147
Although the bug is in the compiler, the regression is caused by a change in Phobos.
Full reduction:
/////// test.d ///////
struct Variant
{
~this()
{
}
@property get(T)()
{
union Buf { }
Buf buf;
return buf;
}
}
struct S {}
Variant value();
void test()
{
value.get!S;
}
//////////////////////