Skip to content

Commit eb5a7c4

Browse files
---
yaml --- r: 315262 b: refs/heads/master-next c: a5db6bf h: refs/heads/master
1 parent ca121c9 commit eb5a7c4

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3fe9333052029c114ef816ea805c335eb1ee8a99
3-
refs/heads/master-next: 6d40a96c0a96c9691a9b39bfa1fcc6e219ce8079
3+
refs/heads/master-next: a5db6bf0a5f96be5f6fcb05101e06ed6246f7044
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/include/swift/AST/DiagnosticsSema.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ ERROR(could_not_find_value_member_corrected,none,
8383
(Type, DeclName, DeclName))
8484
ERROR(could_not_find_value_dynamic_member_corrected,none,
8585
"neither the value type %0 and dynamic key path subscript of type %1 has a member %2; did you mean %3?",
86-
(Type,Type, DeclName, DeclName))
86+
(Type, Type, DeclName, DeclName))
8787

8888
ERROR(could_not_find_type_member,none,
8989
"type %0 has no member %1", (Type, DeclName))

branches/master-next/lib/Sema/CSDiagnostics.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2237,8 +2237,8 @@ bool MissingMemberFailure::diagnoseAsError() {
22372237
auto tryTypoCorrection = [&] {
22382238
TC.performTypoCorrection(getDC(), DeclRefKind::Ordinary, baseType,
22392239
defaultMemberLookupOptions, corrections);
2240-
// If isForKeyPathDynamicMemberLookup we are including the
2241-
// typo corrections to the wrapper type too.
2240+
// If locator points to the member found via key path dynamic member lookup,
2241+
// emit typo corrections for the wrapper type too.
22422242
if (getLocator()->isForKeyPathDynamicMemberLookup()) {
22432243
TC.performTypoCorrection(getDC(), DeclRefKind::Ordinary,
22442244
baseExprType, defaultMemberLookupOptions,
@@ -2312,22 +2312,22 @@ bool MissingMemberFailure::diagnoseAsError() {
23122312
if (auto correction = corrections.claimUniqueCorrection()) {
23132313
if (getLocator()->isForKeyPathDynamicMemberLookup()) {
23142314
auto diagnostic = emitDiagnostic(
2315-
anchor->getLoc(),
2316-
diag::could_not_find_value_dynamic_member_corrected,
2317-
baseExprType, baseType, getName(),
2318-
correction->CorrectedName);
2315+
anchor->getLoc(),
2316+
diag::could_not_find_value_dynamic_member_corrected,
2317+
baseExprType, baseType, getName(),
2318+
correction->CorrectedName);
23192319
diagnostic.highlight(baseExpr->getSourceRange())
2320-
.highlight(nameLoc.getSourceRange());
2320+
.highlight(nameLoc.getSourceRange());
23212321
correction->addFixits(diagnostic);
23222322

23232323
} else {
23242324
auto diagnostic = emitDiagnostic(
2325-
anchor->getLoc(),
2326-
diag::could_not_find_value_member_corrected,
2327-
baseType, getName(),
2328-
correction->CorrectedName);
2325+
anchor->getLoc(),
2326+
diag::could_not_find_value_member_corrected,
2327+
baseType, getName(),
2328+
correction->CorrectedName);
23292329
diagnostic.highlight(baseExpr->getSourceRange())
2330-
.highlight(nameLoc.getSourceRange());
2330+
.highlight(nameLoc.getSourceRange());
23312331
correction->addFixits(diagnostic);
23322332
}
23332333
} else {

0 commit comments

Comments
 (0)