http://d.puremagic.com/issues/show_bug.cgi?id=2848
Summary: static if (is(type)) + alias fails to compile Product: D Version: 1.043 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzi...@digitalmars.com ReportedBy: llu...@gmail.com This simple test fails to compile: static if (!is(typeof(no_type))) alias char[] no_type; no_type x; In all D compilers available, tested in GDC, DMD 1.043, DMD 2.027 and LDC r1197 (so it seems like a front-end issue). The error is: t.d:3: Error: identifier 'no_type' is not defined t.d:3: Error: no_type is used as a type t.d:3: variable t.x voids have no value This test doesn't compile either: static if (!is(typeof(no_type))) { alias char[] no_type; no_type y; } Error: t.d(3): Error: identifier 'no_type' is not defined t.d(3): Error: no_type is used as a type t.d(3): variable t.x voids have no value --