Poor (or Rich) Man's Refinement Types in Scala 3.x?

Please don’t do this, there is no guarantee that A & B will always erase to A it might also erase to B and then this will fail at runtime, do something like what @Jasper-M suggested instead.