@@ -2023,7 +2023,8 @@ class AllowKeyPathWithoutComponents final : public ConstraintFix {
2023
2023
ConstraintLocator *locator);
2024
2024
};
2025
2025
2026
- class IgnoreInvalidResultBuilderBody final : public ConstraintFix {
2026
+ class IgnoreInvalidResultBuilderBody : public ConstraintFix {
2027
+ protected:
2027
2028
enum class ErrorInPhase {
2028
2029
PreCheck,
2029
2030
ConstraintGeneration,
@@ -2062,6 +2063,22 @@ class IgnoreInvalidResultBuilderBody final : public ConstraintFix {
2062
2063
create (ConstraintSystem &cs, ErrorInPhase phase, ConstraintLocator *locator);
2063
2064
};
2064
2065
2066
+ class IgnoreResultBuilderWithReturnStmts final
2067
+ : public IgnoreInvalidResultBuilderBody {
2068
+ Type BuilderType;
2069
+
2070
+ IgnoreResultBuilderWithReturnStmts (ConstraintSystem &cs, Type builderTy,
2071
+ ConstraintLocator *locator)
2072
+ : IgnoreInvalidResultBuilderBody(cs, ErrorInPhase::PreCheck, locator),
2073
+ BuilderType (builderTy) {}
2074
+
2075
+ public:
2076
+ bool diagnose (const Solution &solution, bool asNote = false ) const override ;
2077
+
2078
+ static IgnoreResultBuilderWithReturnStmts *
2079
+ create (ConstraintSystem &cs, Type builderTy, ConstraintLocator *locator);
2080
+ };
2081
+
2065
2082
class SpecifyContextualTypeForNil final : public ConstraintFix {
2066
2083
SpecifyContextualTypeForNil (ConstraintSystem &cs,
2067
2084
ConstraintLocator *locator)
0 commit comments