[Issue 15923] New: is expression qualifier matching does not work with multiple qualifiers
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Wed Apr 13 20:08:57 PDT 2016
    
    
  
https://issues.dlang.org/show_bug.cgi?id=15923
          Issue ID: 15923
           Summary: is expression qualifier matching does not work with
                    multiple qualifiers
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: andrei at erdani.com
Consider:
alias T = shared(const int);
static if (is(T == shared(U), U))
    pragma(msg, "works");
else
    static assert(0, "does not work");
This fails to compile. The compiler should peel the "shared" and bind U to
const int. This code does work:
alias T = shared(const int);
static if (is(T == shared(const(U)), U))
    pragma(msg, "works");
else
    static assert(0, "does not work");
--
    
    
More information about the Digitalmars-d-bugs
mailing list