Cleanup and consolidate operator/method dispatch code #18741
Open
Description
opened on Nov 7, 2014
Once upon a time, both operator dispatch and method lookup went through the same tangled, twisty paths. It was a mess. But lo, they were severed and made two. Each could follow its own path. Overall, this is progress. But there is still room for improvement:
- The second half of "operator dispatch" is basically the same as
confirm::confirm
, but with some slight differences. - The autoderef loop for
[]
is basically the same asprobe
, but with some slight differences (e.g., at each step it consists builtin[]
as well). - The
probe
loop, which usescheck::autoderef
, isn't able to be part of an inference transaction betweencheck::autoderef
uses operator dispatch which adds things into the main fulfillment context, thus leaking inference types etc outside the transaction.
It feels like things could still be cleaned up a bit further, allowing for more code reuse and happiness all around.
Some FIXMEs are scattered about at relevant points of the code.
Activity