www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21898] New: Qualifier ignored in alias definition if

https://issues.dlang.org/show_bug.cgi?id=21898

          Issue ID: 21898
           Summary: Qualifier ignored in alias definition if parentheses
                    are not present
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dlang.org
          Assignee: nobody puremagic.com
          Reporter: andrei erdani.com

Consider:

alias Works(T) = immutable(T);
alias Fails(T) = immutable T;

static assert(is(Works!int == immutable int));
static assert(is(Fails!int == immutable int));

The first static assert passes, the second doesn't. Both should.

--
May 06