File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1224,8 +1224,8 @@ bool TypeVariableBinding::attempt(ConstraintSystem &cs) const {
1224
1224
} else if (srcLocator->directlyAt <ObjectLiteralExpr>()) {
1225
1225
fix = SpecifyObjectLiteralTypeImport::create (cs, dstLocator);
1226
1226
} else if (srcLocator->isKeyPathRoot ()) {
1227
- // If we recorded a invalid key path fix, let's skip this root fix
1228
- // because it wouldn't produce a useful diagnostic.
1227
+ // If we recorded an invalid key path fix, let's skip this specify root
1228
+ // type fix because it wouldn't produce a useful diagnostic.
1229
1229
auto *kpLocator = cs.getConstraintLocator (srcLocator->getAnchor ());
1230
1230
if (cs.hasFixFor (kpLocator, FixKind::AllowKeyPathWithoutComponents))
1231
1231
return true ;
Original file line number Diff line number Diff line change @@ -6766,9 +6766,9 @@ bool InvalidEmptyKeyPathFailure::diagnoseAsError() {
6766
6766
assert (KPE && KPE->hasSingleInvalidComponent () &&
6767
6767
" Expected a malformed key path expression" );
6768
6768
6769
- // String interpolation represented as key path expressions e.g. \(x),
6770
- // \(x, a: 1) and this is already diagnosed. So let 's skip it because
6771
- // that is not the case for a empty key path diagnostic.
6769
+ // If we have a string interpolation represented as key path expressions
6770
+ // e.g. \(x), \(x, a: 1). Let 's skip it because this would be already
6771
+ // diagnosed and it is not the case for an extra empty key path diagnostic.
6772
6772
auto *root = KPE->getParsedRoot ();
6773
6773
if (root && (isa<ParenExpr>(root) || isa<TupleExpr>(root)))
6774
6774
return true ;
Original file line number Diff line number Diff line change @@ -2248,7 +2248,7 @@ class TrailingClosureRequiresExplicitLabel final : public FailureDiagnostic {
2248
2248
const FunctionArgApplyInfo &info) const ;
2249
2249
};
2250
2250
2251
- // / Diagnose situations where we have key path missing a component .
2251
+ // / Diagnose situations where we have a key path with no components .
2252
2252
// /
2253
2253
// / \code
2254
2254
// / let _ : KeyPath<A, B> = \A
Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ enum class FixKind : uint8_t {
274
274
// / parameter in the call.
275
275
SpecifyLabelToAssociateTrailingClosure,
276
276
277
- // / Allow key path expressions missing component .
277
+ // / Allow key path expressions with no components .
278
278
AllowKeyPathWithoutComponents,
279
279
};
280
280
@@ -1961,7 +1961,7 @@ class SpecifyLabelToAssociateTrailingClosure final : public ConstraintFix {
1961
1961
create (ConstraintSystem &cs, ConstraintLocator *locator);
1962
1962
};
1963
1963
1964
- // / Diagnose situations where we have key path missing a component .
1964
+ // / Diagnose situations where we have a key path with no components .
1965
1965
// /
1966
1966
// / \code
1967
1967
// / let _ : KeyPath<A, B> = \A
You can’t perform that action at this time.
0 commit comments