Pmc CoreMap: consider any two dictionaries of the same type equal
This patch massages the keys used in the TmOracle
CoreMap
to ensure that dictionaries of coherent classes give the same key. That is, whenever we have an expression we want to insert or lookup in the TmOracle
CoreMap
, we first replace any dictionary $dict_abcd :: ct
with a value of the form error @ct
.
This allows us to common-up view pattern functions with required constraints whose arguments differ only in the uniques of the dictionaries, thus fixing #21662 (closed).
This is a rather ad-hoc change to the keys used in the TmOracle
CoreMap
. In the long run, we would probably want to use a different representation for the keys instead of simply using CoreExpr
as-is. This more ambitious plan is outlined in #19272.