We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48d4997 commit f83c719Copy full SHA for f83c719
lib/Sema/ConstraintSystem.cpp
@@ -5472,6 +5472,14 @@ void ConstraintSystem::diagnoseFailureFor(SolutionApplicationTarget target) {
5472
SWIFT_DEFER { setPhase(ConstraintSystemPhase::Finalization); };
5473
5474
auto &DE = getASTContext().Diags;
5475
+
5476
+ // If constraint system is in invalid state always produce
5477
+ // a fallback diagnostic that asks to file a bug.
5478
+ if (inInvalidState()) {
5479
+ DE.diagnose(target.getLoc(), diag::failed_to_produce_diagnostic);
5480
+ return;
5481
+ }
5482
5483
if (auto expr = target.getAsExpr()) {
5484
if (auto *assignment = dyn_cast<AssignExpr>(expr)) {
5485
if (isa<DiscardAssignmentExpr>(assignment->getDest()))
0 commit comments