Skip to content

Commit a37fbbd

Browse files
committed
Remove a dynamically-dead diagnostic
1 parent 62d1fa7 commit a37fbbd

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

include/swift/AST/DiagnosticsParse.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,6 @@ ERROR(protocol_init_argument_init,none,
648648
"default argument not permitted in a protocol initializer", ())
649649

650650
// Protocol Types
651-
ERROR(expected_langle_protocol,PointsToFirstBadToken,
652-
"expected '<' in protocol composition type", ())
653651
ERROR(expected_rangle_protocol,PointsToFirstBadToken,
654652
"expected '>' to complete protocol composition type", ())
655653
ERROR(disallowed_protocol_composition,PointsToFirstBadToken,

lib/Parse/ParseType.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -410,12 +410,6 @@ ParserResult<TypeRepr> Parser::parseTypeIdentifierOrTypeComposition() {
410410
// Handle deprecated case
411411
if (Tok.getKind() == tok::kw_protocol && startsWithLess(peekToken())) {
412412
SourceLoc ProtocolLoc = consumeToken(tok::kw_protocol);
413-
414-
// Check for the starting '<'.
415-
if (!startsWithLess(Tok)) {
416-
diagnose(Tok, diag::expected_langle_protocol);
417-
return nullptr;
418-
}
419413
SourceLoc LAngleLoc = consumeStartingLess();
420414

421415
// Check for empty protocol composition.

0 commit comments

Comments
 (0)