Dotty union types: matching with a type alias does not allow run-time type checking?

I’m a bit surprised that you can reliably match and isInstanceOf with union types. But it does seem to work. I think the warning is a bug, or at least overeager. Probably there’s a line somewhere in the compiler like if (tp.isAlias && !tp.dealias.isClassType) warn(...) that doesn’t take into account that instanceOf checks with union types also work.