Pattern matching is-expressions
Adam D. Ruppe
destructionator at gmail.com
Fri Aug 21 17:42:41 UTC 2020
On Friday, 21 August 2020 at 17:39:12 UTC, Stefan Koch wrote:
> I just found out that
> is(T S == super)
> returns true, even if T is object.Object.
yeah it actually sets S to be a tuple of (base class,
interfaces...). So you need to check the length of it too.
It gives false only if passed a type that has no super at all,
like a struct or a basic type.
More information about the Digitalmars-d