www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4097] New: Error: can only declare type aliases within static if conditionals

reply d-bugmail puremagic.com writes:
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: -------
Apr 16 2010
next sibling parent d-bugmail puremagic.com writes:
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: -------
Jan 06 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
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: -------
Jan 06 2011
prev sibling parent d-bugmail puremagic.com writes:
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: -------
Apr 07 2011