Summary: `alias <qualifier> <type>` ignores <qualifier> in
                    foreach over tuple
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Denis Shelomovskij <> 2012-11-02 
18:39:32 MSK ---
Qualifier is ignored in foreach over tuple if there is no parantheses:
alias const int A0;
static assert(is(A0 == const int)); // passes

void main()
    alias const int A1;
    static assert(is(A1 == const int)); // passes

    static struct S { int i; }
    foreach(Unused; typeof(S.tupleof))
        alias const(int) A2_;
        static assert(is(A2_ == const int)); // also passes

        alias const int A2;
        static assert(is(A2 == const int)); // fails
        // Error: static assert  (is(int == const(int))) is false

As always, such (unexpected) template bugs are hard to figure out.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to