mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 13:10:11 +01:00
Migrate remaining exits to FATAL_*_ERROR calls (#704)
Adds FATAL for things that are most likely programming errors in executable_semantics.
This commit is contained in:
@@ -86,7 +86,7 @@ AlternativePattern::AlternativePattern(int line_num,
|
||||
const TuplePattern* arguments)
|
||||
: Pattern(Kind::AlternativePattern, line_num), arguments(arguments) {
|
||||
if (alternative->tag() != ExpressionKind::FieldAccessExpression) {
|
||||
FATAL_USER_ERROR(alternative->line_num)
|
||||
FATAL_PROGRAM_ERROR(alternative->line_num)
|
||||
<< "Alternative pattern must have the form of a field access.";
|
||||
}
|
||||
const auto& field_access = alternative->GetFieldAccessExpression();
|
||||
|
||||
Reference in New Issue
Block a user