mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
committed by
Pavel Yaskevich
parent
01a4468b32
commit
1c258ca05f
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user