@@ -351,6 +351,9 @@ enum class FixKind : uint8_t {
351
351
// / Allow invalid pointer conversions for autoclosure result types as if the
352
352
// / pointer type is a function parameter rather than an autoclosure result.
353
353
AllowAutoClosurePointerConversion,
354
+
355
+ // / Ignore externally imposed type.
356
+ IgnoreContextualType,
354
357
};
355
358
356
359
class ConstraintFix {
@@ -1938,7 +1941,8 @@ class AllowTupleSplatForSingleParameter final : public ConstraintFix {
1938
1941
class IgnoreContextualType : public ContextualMismatch {
1939
1942
IgnoreContextualType (ConstraintSystem &cs, Type resultTy, Type specifiedTy,
1940
1943
ConstraintLocator *locator)
1941
- : ContextualMismatch(cs, resultTy, specifiedTy, locator) {}
1944
+ : ContextualMismatch(cs, FixKind::IgnoreContextualType, resultTy,
1945
+ specifiedTy, locator) {}
1942
1946
1943
1947
public:
1944
1948
std::string getName () const override {
@@ -1950,6 +1954,10 @@ class IgnoreContextualType : public ContextualMismatch {
1950
1954
static IgnoreContextualType *create (ConstraintSystem &cs, Type resultTy,
1951
1955
Type specifiedTy,
1952
1956
ConstraintLocator *locator);
1957
+
1958
+ static bool classof (ConstraintFix *fix) {
1959
+ return fix->getKind () == FixKind::IgnoreContextualType;
1960
+ }
1953
1961
};
1954
1962
1955
1963
class IgnoreAssignmentDestinationType final : public ContextualMismatch {
0 commit comments