mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-18 21:30:28 +00:00
Produce a more descriptive error if an array type's bound is too large. (#3638)
This commit is contained in:
1 parent
65e95942de
commit
099bd5ce26
4 files changed
+43
-23
No files matched your search
@@ -41,8 +41,7 @@ auto HandleArrayExpr(Context& context, Parse::ArrayExprId parse_node) -> bool {
|
||||
if (!bound_inst.is_constant()) {
|
||||
CARBON_DIAGNOSTIC(InvalidArrayExpr, Error,
|
||||
"Array bound is not a constant.");
|
||||
context.emitter().Emit(context.insts().GetParseNode(bound_inst_id),
|
||||
InvalidArrayExpr);
|
||||
context.emitter().Emit(bound_inst_id, InvalidArrayExpr);
|
||||
context.node_stack().Push(parse_node, SemIR::InstId::BuiltinError);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user