@@ -109,12 +109,6 @@ enum class FixKind : uint8_t {
109
109
// / Fix up the generic arguments of two types so they match each other.
110
110
GenericArgumentsMismatch,
111
111
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
-
118
112
// / Remove `!` or `?` because base is not an optional type.
119
113
RemoveUnwrap,
120
114
@@ -1219,33 +1213,6 @@ class GenericArgumentsMismatch final
1219
1213
}
1220
1214
};
1221
1215
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
-
1249
1216
class AllowAutoClosurePointerConversion final : public ContextualMismatch {
1250
1217
AllowAutoClosurePointerConversion (ConstraintSystem &cs, Type pointeeType,
1251
1218
Type pointerType,
0 commit comments