Skip to content

Commit 1c258ca

Browse files
committed
[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.
1 parent 01a4468 commit 1c258ca

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10674,9 +10674,6 @@ ConstraintSystem::simplifyApplicableFnConstraint(
1067410674

1067510675
switch (matchCallResult) {
1067610676
case SolutionKind::Error: {
10677-
if (shouldAttemptFixes())
10678-
return SolutionKind::Error;
10679-
1068010677
auto resultTy = func2->getResult();
1068110678

1068210679
// If this is a call that constructs a callable type with

0 commit comments

Comments
 (0)