[dmd2.068] Bug or future?
Ali Çehreli via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Aug 6 23:51:15 PDT 2015
On 08/06/2015 11:26 PM, VlasovRoman wrote:
> I have some code:
Reduced:
import std.stdio;
auto foo(T)(T)
{
return 42;
}
struct Vector(T)
{
pragma(msg, is(typeof(foo(Vector.init)))); // prints true
static if(is(typeof(foo(Vector.init)))) {
static assert(false); // is not included
}
}
void main()
{
Vector!float v;
}
'static if' fails to include code even though the is expression produces
'true'. I think this is a regression. If others agree let's create a
regression quickly before tomorrow's (today's?) planned release.
Ali
More information about the Digitalmars-d-learn
mailing list