@@ -354,6 +354,9 @@ enum class FixKind : uint8_t {
354
354
355
355
// / Ignore externally imposed type.
356
356
IgnoreContextualType,
357
+
358
+ // / Ignore a type imposed by an assignment destination e.g. `let x: Int = ...`
359
+ IgnoreAssignmentDestinationType,
357
360
};
358
361
359
362
class ConstraintFix {
@@ -1963,7 +1966,8 @@ class IgnoreContextualType : public ContextualMismatch {
1963
1966
class IgnoreAssignmentDestinationType final : public ContextualMismatch {
1964
1967
IgnoreAssignmentDestinationType (ConstraintSystem &cs, Type sourceTy,
1965
1968
Type destTy, ConstraintLocator *locator)
1966
- : ContextualMismatch(cs, sourceTy, destTy, locator) {}
1969
+ : ContextualMismatch(cs, FixKind::IgnoreAssignmentDestinationType,
1970
+ sourceTy, destTy, locator) {}
1967
1971
1968
1972
public:
1969
1973
std::string getName () const override {
@@ -1977,6 +1981,10 @@ class IgnoreAssignmentDestinationType final : public ContextualMismatch {
1977
1981
static IgnoreAssignmentDestinationType *create (ConstraintSystem &cs,
1978
1982
Type sourceTy, Type destTy,
1979
1983
ConstraintLocator *locator);
1984
+
1985
+ static bool classof (ConstraintFix *fix) {
1986
+ return fix->getKind () == FixKind::IgnoreAssignmentDestinationType;
1987
+ }
1980
1988
};
1981
1989
1982
1990
// / If this is an argument-to-parameter conversion which is associated with
0 commit comments