Closed ta0kira closed 3 years ago
It should be sufficient to expand both sides until an intersection vs. union comparison is reached. This means checking for success if the left and right aggregations overlap even the slightest bit. Everything else is checking for a subset. For the "any" aggregation to work, both sides need to be expanded separately, with the other side left intact.
Reopening this because this also needs to be fixed in the reduce
implementation. (See TypeInstance::CanConvert
.)
Suppose we're checking
[A&B]
→[[A&B]|C]
. Currently, this will be expanded toA
→[[A&B]|C]
||B
→[[A&B]|C]
, neither of which succeed. The flaw seems to be that combinations aren't taken into account.