How to test for equality of types?

Steven Schveighoffer schveiguy at yahoo.com
Fri May 18 07:12:14 PDT 2012


On Fri, 18 May 2012 06:06:45 -0400, Matthias Walter  
<xammy at xammy.homelinux.net> wrote:

> Hi,
>
> how do I test two types for equality? Suppose I have A and B aliasing
> some type(s), how do I find out if they are aliases the same thing?
>
> I tried the "is(A == B)" expression, but this does not always work (tell
> me if I shall give an example).

I would expect this to work.  What situation does it not (maybe you aren't  
actually testing for equality there).

It could be a bug...

> On the other hand, according to the spec the IsExpression is not
> supposed to compare two aliases with each other.

where does it say that?

-Steve


More information about the Digitalmars-d-learn mailing list