It may take some experimentation to find the best way to express this: at present, we can just use simple stuff like foo.contains(...) to search for overlap, but with unions this doesn't quite work. Well, we could make it work by mapping all union field to a single "meta-field" (or by creating loans of all fields when one field is borrowed, as in the current implementation) -- but I'd prefer to avoid that, because if/when we scale to fields in traits, that approach doesn't work. It also doesn't help us deal with indices. To deal properly, we want to have the ability to have paths like a.b.c and a.b.d that are considered to alias, even though c != d.
It may take some experimentation to find the best way to express this: at present, we can just use simple stuff like
foo.contains(...)
to search for overlap, but with unions this doesn't quite work. Well, we could make it work by mapping all union field to a single "meta-field" (or by creating loans of all fields when one field is borrowed, as in the current implementation) -- but I'd prefer to avoid that, because if/when we scale to fields in traits, that approach doesn't work. It also doesn't help us deal with indices. To deal properly, we want to have the ability to have paths likea.b.c
anda.b.d
that are considered to alias, even thoughc != d
.