diff --git a/lib/Sema/ConstraintSystem.h b/lib/Sema/ConstraintSystem.h index c33623047e97f..1ddb72f372b0d 100644 --- a/lib/Sema/ConstraintSystem.h +++ b/lib/Sema/ConstraintSystem.h @@ -1444,6 +1444,9 @@ class ConstraintSystem { void removeInactiveConstraint(Constraint *constraint) { CG.removeConstraint(constraint); InactiveConstraints.erase(constraint); + + if (solverState) + solverState->retiredConstraints.push_back(constraint); } /// Retrieve the list of inactive constraints. diff --git a/validation-test/compiler_crashers/28231-swift-constraints-constraintsystem-solvesimplified.swift b/validation-test/compiler_crashers_fixed/28231-swift-constraints-constraintsystem-solvesimplified.swift similarity index 86% rename from validation-test/compiler_crashers/28231-swift-constraints-constraintsystem-solvesimplified.swift rename to validation-test/compiler_crashers_fixed/28231-swift-constraints-constraintsystem-solvesimplified.swift index 694e4cfa76354..ad26b1316fb77 100644 --- a/validation-test/compiler_crashers/28231-swift-constraints-constraintsystem-solvesimplified.swift +++ b/validation-test/compiler_crashers_fixed/28231-swift-constraints-constraintsystem-solvesimplified.swift @@ -5,5 +5,5 @@ // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// RUN: not --crash %target-swift-frontend %s -typecheck +// RUN: not %target-swift-frontend %s -typecheck {func a(a)class a{deinit{a(a{ diff --git a/validation-test/compiler_crashers/28242-swift-constraints-constraintsystem-simplify.swift b/validation-test/compiler_crashers_fixed/28242-swift-constraints-constraintsystem-simplify.swift similarity index 87% rename from validation-test/compiler_crashers/28242-swift-constraints-constraintsystem-simplify.swift rename to validation-test/compiler_crashers_fixed/28242-swift-constraints-constraintsystem-simplify.swift index cdc7c8c2d7ee3..6f26bc62603d0 100644 --- a/validation-test/compiler_crashers/28242-swift-constraints-constraintsystem-simplify.swift +++ b/validation-test/compiler_crashers_fixed/28242-swift-constraints-constraintsystem-simplify.swift @@ -5,5 +5,5 @@ // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// RUN: not --crash %target-swift-frontend %s -typecheck +// RUN: not %target-swift-frontend %s -typecheck {struct b{let a{struct D{let a=b([print{}}}}struct b diff --git a/validation-test/compiler_crashers/28247-swift-constraints-constraintsystem-solverscope-solverscope.swift b/validation-test/compiler_crashers_fixed/28247-swift-constraints-constraintsystem-solverscope-solverscope.swift similarity index 86% rename from validation-test/compiler_crashers/28247-swift-constraints-constraintsystem-solverscope-solverscope.swift rename to validation-test/compiler_crashers_fixed/28247-swift-constraints-constraintsystem-solverscope-solverscope.swift index 38038acbdd6ad..3236ef6496ce0 100644 --- a/validation-test/compiler_crashers/28247-swift-constraints-constraintsystem-solverscope-solverscope.swift +++ b/validation-test/compiler_crashers_fixed/28247-swift-constraints-constraintsystem-solverscope-solverscope.swift @@ -5,5 +5,5 @@ // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// RUN: not --crash %target-swift-frontend %s -typecheck +// RUN: not %target-swift-frontend %s -typecheck {func a(a)class a{var _=a(a{{a{ diff --git a/validation-test/compiler_crashers/28359-swift-constraints-constraintsystem-addtypevariableconstraintstoworklist.swift b/validation-test/compiler_crashers_fixed/28359-swift-constraints-constraintsystem-addtypevariableconstraintstoworklist.swift similarity index 87% rename from validation-test/compiler_crashers/28359-swift-constraints-constraintsystem-addtypevariableconstraintstoworklist.swift rename to validation-test/compiler_crashers_fixed/28359-swift-constraints-constraintsystem-addtypevariableconstraintstoworklist.swift index d7a77278fb636..f9fc859bd1034 100644 --- a/validation-test/compiler_crashers/28359-swift-constraints-constraintsystem-addtypevariableconstraintstoworklist.swift +++ b/validation-test/compiler_crashers_fixed/28359-swift-constraints-constraintsystem-addtypevariableconstraintstoworklist.swift @@ -5,5 +5,5 @@ // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// RUN: not --crash %target-swift-frontend %s -typecheck +// RUN: not %target-swift-frontend %s -typecheck {class a{}func a(a)class c{func b{{{a(a{