@@ -109,12 +109,6 @@ enum class FixKind : uint8_t {
109109 // / Fix up the generic arguments of two types so they match each other.
110110 GenericArgumentsMismatch,
111111
112- // / Fix up @autoclosure argument to the @autoclosure parameter,
113- // / to for a call to be able to forward it properly, since
114- // / @autoclosure conversions are unsupported starting from
115- // / Swift version 5.
116- AutoClosureForwarding,
117-
118112 // / Remove `!` or `?` because base is not an optional type.
119113 RemoveUnwrap,
120114
@@ -1219,33 +1213,6 @@ class GenericArgumentsMismatch final
12191213 }
12201214};
12211215
1222- // / Detect situations when argument of the @autoclosure parameter is itself
1223- // / marked as @autoclosure and is not applied. Form a fix which suggests a
1224- // / proper way to forward such arguments, e.g.:
1225- // /
1226- // / ```swift
1227- // / func foo(_ fn: @autoclosure () -> Int) {}
1228- // / func bar(_ fn: @autoclosure () -> Int) {
1229- // / foo(fn) // error - fn should be called
1230- // / }
1231- // / ```
1232- class AutoClosureForwarding final : public ConstraintFix {
1233- AutoClosureForwarding (ConstraintSystem &cs, ConstraintLocator *locator)
1234- : ConstraintFix(cs, FixKind::AutoClosureForwarding, locator) {}
1235-
1236- public:
1237- std::string getName () const override { return " fix @autoclosure forwarding" ; }
1238-
1239- bool diagnose (const Solution &solution, bool asNote = false ) const override ;
1240-
1241- static AutoClosureForwarding *create (ConstraintSystem &cs,
1242- ConstraintLocator *locator);
1243-
1244- static bool classof (const ConstraintFix *fix) {
1245- return fix->getKind () == FixKind::AutoClosureForwarding;
1246- }
1247- };
1248-
12491216class AllowAutoClosurePointerConversion final : public ContextualMismatch {
12501217 AllowAutoClosurePointerConversion (ConstraintSystem &cs, Type pointeeType,
12511218 Type pointerType,
0 commit comments