Merge pull request #7042 from catermujo/push-nyzmuzxuzpox

compiler: preserve recursive struct aliases
This commit is contained in:
Jeroen van Rijn
2026-07-16 10:21:31 +02:00
committed by GitHub
4 changed files with 23 additions and 2 deletions

View File

@@ -2037,11 +2037,11 @@ gb_internal Entity *check_ident(CheckerContext *c, Operand *o, Ast *n, Type *nam
}
if (o->type != nullptr && o->type->kind == Type_Named && o->type->Named.type_name->TypeName.is_type_alias) {
Type *bt = base_type(o->type);
if (bt != nullptr) {
// Keep struct aliases named so recursive fields retain their alias edge.
if (bt != nullptr && bt->kind != Type_Struct) {
o->type = bt;
}
}
break;
case Entity_ImportName: