mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Assert on defining a const fault enum with enumerator and fault of the same name. #2732
This commit is contained in:
@@ -1777,7 +1777,7 @@ ERR:
|
||||
bool sema_analyse_const_enum_constant_val(SemaContext *context, Decl *decl)
|
||||
{
|
||||
Expr *value = decl->enum_constant.value;
|
||||
if (!sema_analyse_inferred_expr(context, decl->type, value,NULL)) return decl_poison(decl);
|
||||
if (!sema_analyse_inferred_expr(context, decl->type, value, NULL)) return decl_poison(decl);
|
||||
if (!expr_is_runtime_const(value))
|
||||
{
|
||||
SEMA_ERROR(value, "Expected an constant enum value.");
|
||||
|
||||
Reference in New Issue
Block a user