Avoid more constraints in result if trying views #24369
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In
canProfitFromMoreConstraints, balk ifmode.is(ImplicitExploration).The failing case was due to the
constrainResult"up the stack" inadaptNoArgs, which drove type comparisons and completions, including a conversion. TheFunProtocontext had a console reporter that emitted the errors encountered, not an exploring reporter.The justification is that "more constraints" is motivated by arg inference, so if the arg is already involved in views, further information in the result is not needed, especially at the cost of spurious exploratory errors using a context that doesn't reflect the current mode.