[Issue 4097] New: Error: can only declare type aliases within static if conditionals
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 16 09:03:54 PDT 2010
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: nobody at puremagic.com
ReportedBy: nfxjfg at gmail.com
--- Comment #0 from nfxjfg at gmail.com 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: -------
More information about the Digitalmars-d-bugs
mailing list