Thread overview | ||||||
---|---|---|---|---|---|---|
|
April 16, 2010 [Issue 4097] New: Error: can only declare type aliases within static if conditionals | ||||
---|---|---|---|---|
| ||||
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@puremagic.com ReportedBy: nfxjfg@gmail.com --- Comment #0 from nfxjfg@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: ------- |
January 07, 2011 [Issue 4097] Error: can only declare type aliases within static if conditionals | ||||
---|---|---|---|---|
| ||||
Posted in reply to nfxjfg@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=4097 nfxjfg@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
January 07, 2011 [Issue 4097] Error: can only declare type aliases within static if conditionals | ||||
---|---|---|---|---|
| ||||
Posted in reply to nfxjfg@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=4097 Brad Roberts <braddr@puremagic.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |braddr@puremagic.com Resolution|INVALID | -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 07, 2011 [Issue 4097] Error: can only declare type aliases within static if conditionals | ||||
---|---|---|---|---|
| ||||
Posted in reply to nfxjfg@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=4097 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED CC| |bugzilla@digitalmars.com Version|future |D2 Resolution| |FIXED --- Comment #1 from Walter Bright <bugzilla@digitalmars.com> 2011-04-07 15:49:33 PDT --- I think you're right. https://github.com/D-Programming-Language/dmd/commit/7588ca35c5e723a8fccfbfc1db684114aa1e29aa -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation