Skip to content

Commit ab59032

Browse files
hborlaxedin
authored andcommitted
[CSDiag] Remove obsolete ambiguity code.
1 parent d1f6b3e commit ab59032

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ NOTE(candidate_partial_match,none,
6868
"candidate has partially matching parameter list %0",
6969
(StringRef))
7070

71-
ERROR(ambiguous_subscript,none,
72-
"ambiguous subscript with base type %0 and index type %1",
73-
(Type, Type))
7471
ERROR(could_not_find_value_subscript,none,
7572
"value of type %0 has no subscripts",
7673
(Type))
@@ -273,16 +270,6 @@ ERROR(no_candidates_match_result_type,none,
273270
"no '%0' candidates produce the expected contextual result type %1",
274271
(StringRef, Type))
275272

276-
ERROR(candidates_no_match_result_type,none,
277-
"'%0' produces %1, not the expected contextual result type %2",
278-
(StringRef, Type, Type))
279-
280-
281-
282-
ERROR(invalid_callee_result_type,none,
283-
"cannot convert call result type %0 to expected type %1",
284-
(Type, Type))
285-
286273

287274
ERROR(cannot_invoke_closure,none,
288275
"cannot invoke closure expression with an argument list of type '%0'",

lib/Sema/CSDiag.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,17 +1247,6 @@ void FailureDiagnosis::diagnoseAmbiguity(Expr *E) {
12471247
return;
12481248
}
12491249

1250-
// Diagnose ".foo" expressions that lack context specifically.
1251-
if (auto UME =
1252-
dyn_cast<UnresolvedMemberExpr>(E->getSemanticsProvidingExpr())) {
1253-
if (!CS.getContextualType(E)) {
1254-
diagnose(E->getLoc(), diag::unresolved_member_no_inference,UME->getName())
1255-
.highlight(SourceRange(UME->getDotLoc(),
1256-
UME->getNameLoc().getSourceRange().End));
1257-
return;
1258-
}
1259-
}
1260-
12611250
// Attempt to re-type-check the entire expression, allowing ambiguity, but
12621251
// ignoring a contextual type.
12631252
if (expr == E) {

0 commit comments

Comments
 (0)