http://d.puremagic.com/issues/show_bug.cgi?id=4097
Summary: Error: can only declare type aliases within static if
conditionals
Product: D
Version: future
Platform: Other
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 2010-04-16 09:03:52 PDT ---
Look at this code:
----------------
void foo() { }
alias typeof(&foo) T;
// works
static if (is(T X : X*) && is(X == function)) {} else { static assert(false); }
// doesn't work
// Error: can only declare type aliases within static if conditionals
static assert(is(T X : X*) && is(X == function));
----------------
This looks really silly. Couldn't that restriction be lifted? The alias would
be only valid within the expression and wouldn't require a static if.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------