diff --git a/src/compiler/parse_global.c b/src/compiler/parse_global.c index eb036656f..be3f2befd 100644 --- a/src/compiler/parse_global.c +++ b/src/compiler/parse_global.c @@ -2592,11 +2592,6 @@ static inline Decl *parse_enum_declaration(ParseContext *c) if (try_consume(c, TOKEN_COLON)) { is_const_enum = try_consume(c, TOKEN_CONST); - if (is_const_enum && compiler.build.old_enums) - { - PRINT_ERROR_LAST("'const' enums are not available with '--use-old-enums'."); - return poisoned_decl; - } if (!tok_is(c, TOKEN_LPAREN) && !tok_is(c, TOKEN_LBRACE)) { val_is_inline = try_consume(c, TOKEN_INLINE); diff --git a/src/compiler/sema_casts.c b/src/compiler/sema_casts.c index 491d9f91c..291ce0074 100644 --- a/src/compiler/sema_casts.c +++ b/src/compiler/sema_casts.c @@ -1539,7 +1539,6 @@ static bool rule_enum_to_value(CastContext *cc, bool is_explicit, bool is_silent { if (!enum_decl->is_substruct) { - return sema_cast_error(cc, false, is_silent); } diff --git a/src/compiler/sema_expr.c b/src/compiler/sema_expr.c index 16b4244f9..00929a012 100644 --- a/src/compiler/sema_expr.c +++ b/src/compiler/sema_expr.c @@ -5704,7 +5704,7 @@ static bool sema_expr_rewrite_to_type_property(SemaContext *context, Expr *expr, .property = property }; return true; } - goto TYPE_CALL;; + goto TYPE_CALL; case TYPE_PROPERTY_LOOKUP: if (!compiler.build.old_enums) {