On Friday, October 20, 2017 21:32:48 Patrick via Digitalmars-d-learn wrote:
> The compiler seems to reject the following code in a class method:
>
> bool test = is(this : myClass);
>
> Could some please explain this?

"this" is not a type. is(T : U) is true if T is implicitly convertible to U.
T and U must both be types. So, you need to use the types of this and
myClass, even if that's just is(typeof(this) : typeof(myClass)) rather than
explicitly using their types.

- Jonathan M Davis

Reply via email to