[Issue 2848] static if (is(type)) + alias fails to compile
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 17 10:31:02 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2848
------- Comment #3 from fvbommel at wxs.nl 2009-04-17 12:31 -------
Workaround:
----
alias char[] String;
static if (!is(no_type))
alias String no_type;
no_type x;
----
It seems to fail when the aliased type is a primitive type or array (static,
dynamic or associative).
It doesn't fail if it's a class, struct, enum, typedef or aliased type.
--
More information about the Digitalmars-d-bugs
mailing list