Skip to content

Commit d56d704

Browse files
committed
Sema: Remove dead diagnostic
1 parent b35f929 commit d56d704

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7523,13 +7523,6 @@ ERROR(result_builder_buildpartialblock_accumulated_not_accessible,none,
75237523
"expression shuffles the elements of this tuple; "
75247524
"this behavior is deprecated", ())
75257525

7526-
//------------------------------------------------------------------------------
7527-
// MARK: Implicit conversion diagnostics
7528-
//------------------------------------------------------------------------------
7529-
ERROR(cannot_implicitly_convert_in_optional_context,none,
7530-
"cannot implicitly convert value of type %0 to expected type %1",
7531-
(Type, Type))
7532-
75337526
//------------------------------------------------------------------------------
75347527
// MARK: marker protocol diagnostics
75357528
//------------------------------------------------------------------------------

lib/Sema/CSDiagnostics.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2837,22 +2837,6 @@ bool ContextualFailure::diagnoseAsError() {
28372837
break;
28382838
}
28392839

2840-
case ConstraintLocator::OptionalPayload: {
2841-
// If this is an attempt at a Double <-> CGFloat conversion
2842-
// through optional chaining, let's produce a tailored diagnostic.
2843-
if (isExpr<OptionalEvaluationExpr>(getAnchor())) {
2844-
if ((fromType->isDouble() || fromType->isCGFloat()) &&
2845-
(toType->isDouble() || toType->isCGFloat())) {
2846-
fromType = OptionalType::get(fromType);
2847-
toType = OptionalType::get(toType);
2848-
diagnostic = diag::cannot_implicitly_convert_in_optional_context;
2849-
break;
2850-
}
2851-
}
2852-
2853-
return false;
2854-
}
2855-
28562840
case ConstraintLocator::EnumPatternImplicitCastMatch: {
28572841
// In this case, the types are reversed, as we are checking whether we
28582842
// can convert the pattern type to the context type.

0 commit comments

Comments
 (0)