mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-17 19:32:23 -07:00
Correct the type aliasing problem, caused by aliases (of aliases)+
This commit is contained in:
@@ -387,6 +387,7 @@ void check_const_decl(CheckerContext *ctx, Entity *e, Ast *type_expr, Ast *init,
|
||||
if (init != nullptr) {
|
||||
Entity *entity = check_entity_from_ident_or_selector(ctx, init);
|
||||
if (entity != nullptr && entity->kind == Entity_TypeName) {
|
||||
// @TypeAliasingProblem
|
||||
// NOTE(bill, 2022-02-03): This is used to solve the problem caused by type aliases
|
||||
// being "confused" as constants
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user