dmd/compiler/test/compilable/test23587.d

18 lines
292 B
D

// https://issues.dlang.org/show_bug.cgi?id=23587
// REQUIRED_ARGS: -w
noreturn stuff()
{
assert(false);
}
void doStuff(alias fun)()
{
cast(void) fun();
string s = "never executed";
static assert(is(typeof(cast(void) fun()) == void));
}
void main()
{
doStuff!stuff();
}