[fine] Nonsense types are ICE

This commit is contained in:
John Doty 2024-01-07 09:21:05 -08:00
parent 4bd3ac06fa
commit 8d09076586

View file

@ -481,7 +481,7 @@ impl<'a> Semantics<'a> {
TreeKind::ExpressionStatement => self.type_of_expression_statement(tree),
TreeKind::Identifier => self.type_of_identifier(t, tree),
_ => None,
_ => self.internal_compiler_error(Some(t), "asking for a nonsense type"),
};
// NOTE: These return `None` if they encounter some problem.