[CSSimplify] Allow .callAsFunction injection after constructor in diagnostic mode

If argument matching fails in diagnostic mode, it can only mean
that it couldn't find any viable fixes to attempt, so let's try
injecting `.callAsFunction` when appropriate to help diagnose
possible mismatches related to ambiguous syntax.
This commit is contained in:
Pavel Yaskevich
2022-02-03 11:55:27 -08:00
committed by Pavel Yaskevich
parent 01a4468b32
commit 1c258ca05f

View File

@@ -10674,9 +10674,6 @@ ConstraintSystem::simplifyApplicableFnConstraint(
switch (matchCallResult) {
case SolutionKind::Error: {
if (shouldAttemptFixes())
return SolutionKind::Error;
auto resultTy = func2->getResult();
// If this is a call that constructs a callable type with