Skip to content

Commit 5a778b1

Browse files
committed
[parser] use existing diagnose message for invalid case raw value
1 parent ab9d029 commit 5a778b1

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

include/swift/AST/DiagnosticsParse.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,6 @@ ERROR(throw_in_function_type,type_parsing,none,
584584
// Enum Types
585585
ERROR(expected_expr_enum_case_raw_value,type_parsing,PointsToFirstBadToken,
586586
"expected expression after '=' in 'case'", ())
587-
ERROR(not_a_proper_raw_value_expression,type_parsing,none,
588-
"not a proper raw value expression", ())
589587
ERROR(nonliteral_enum_case_raw_value,type_parsing,PointsToFirstBadToken,
590588
"raw value for enum case must be a literal", ())
591589

lib/Parse/ParseDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4405,7 +4405,7 @@ ParserStatus Parser::parseDeclEnumCase(ParseDeclOptions Flags,
44054405
return Status;
44064406
}
44074407
if (RawValueExpr.isNull()) {
4408-
diagnose(NextLoc, diag::not_a_proper_raw_value_expression);
4408+
diagnose(NextLoc, diag::nonliteral_enum_case_raw_value);
44094409
Status.setIsParseError();
44104410
return Status;
44114411
}

0 commit comments

Comments
 (0)