Skip to content

Commit f1c2df1

Browse files
committed
Allow arg mismatch subclasses to be warnings
1 parent 4cd1c2e commit f1c2df1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/Sema/CSFix.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,8 @@ class ContextualMismatch : public ConstraintFix {
487487
: ConstraintFix(cs, FixKind::ContextualMismatch, locator), LHS(lhs),
488488
RHS(rhs) {}
489489
ContextualMismatch(ConstraintSystem &cs, FixKind kind, Type lhs, Type rhs,
490-
ConstraintLocator *locator)
491-
: ConstraintFix(cs, kind, locator), LHS(lhs), RHS(rhs) {}
490+
ConstraintLocator *locator, bool warning = false)
491+
: ConstraintFix(cs, kind, locator, warning), LHS(lhs), RHS(rhs) {}
492492

493493
public:
494494
std::string getName() const override { return "fix contextual mismatch"; }
@@ -1347,8 +1347,9 @@ class AllowArgumentMismatch : public ContextualMismatch {
13471347
paramType, locator) {}
13481348

13491349
AllowArgumentMismatch(ConstraintSystem &cs, FixKind kind, Type argType,
1350-
Type paramType, ConstraintLocator *locator)
1351-
: ContextualMismatch(cs, kind, argType, paramType, locator) {}
1350+
Type paramType, ConstraintLocator *locator,
1351+
bool warning = false)
1352+
: ContextualMismatch(cs, kind, argType, paramType, locator, warning) {}
13521353

13531354
public:
13541355
std::string getName() const override {

0 commit comments

Comments
 (0)