www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13692] New: alias this and is-expression anomaly


          Issue ID: 13692
           Summary: alias this and is-expression anomaly
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: peter.alexander.au gmail.com

struct T {
  int[] x;
  alias x this;

pragma(msg, is(T == int[]));   // false
pragma(msg, is(T == U[], U));  // true (!)

I would expect both to be false, as the IsExpression with == is supposed to
test for type equivalence, not implicit conversions.

Nov 06 2014