Skip to content

Commit 71a8d8d

Browse files
committed
[CSDiagnostics] Attempt fix-its for contextual generic argument mismatches
1 parent 82e6d7b commit 71a8d8d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/Sema/CSDiagnostics.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,12 @@ bool GenericArgumentsMismatchFailure::diagnoseAsError() {
11141114
if (!diagnostic)
11151115
return false;
11161116

1117-
emitDiagnosticAt(::getLoc(anchor), *diagnostic, fromType, toType);
1117+
{
1118+
auto diag =
1119+
emitDiagnosticAt(::getLoc(anchor), *diagnostic, fromType, toType);
1120+
(void)tryFixIts(diag);
1121+
}
1122+
11181123
emitNotesForMismatches();
11191124
return true;
11201125
}

0 commit comments

Comments
 (0)