www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15254] New: is expression compares string sub-type equal to

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

          Issue ID: 15254
           Summary: is expression compares string sub-type equal to an
                    array
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

cat > bug.d << CODE
struct S
{
    string s;
    alias s this;
}
static assert(!is(S == U[], U)); // shouldn't be true
static assert(is(S : U[], U));
CODE
dmd -c bug
----

This was the actual cause for issue 15168.

--
Oct 28 2015