[Issue 2848] static if (is(type)) + alias fails to compile

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 17 10:30:49 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2848





------- Comment #2 from llucax at gmail.com  2009-04-17 12:30 -------
It seems to happen for array, int and float aliasee, but not for Object or
struct types...

This workaround works:

alias char[] String;
static if (!is(no_type)) {
         alias String no_type;
         no_type y;
}
no_type x;

It seems not to fail when aliassed to user-defined types (classes, structs,
enums, aliases, typedefs), but for primitive types and arrays it fails.

typedef have the same problem.


-- 



More information about the Digitalmars-d-bugs mailing list