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:
Jon Meow
2021-08-06 13:06:25 -07:00
committed by GitHub
parent 5749413b28
commit 2e9e4f4cb3
23 changed files with 99 additions and 150 deletions
+1 -1
View File
@@ -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();