diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-02-19 10:59:05 +0000 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-02-19 10:59:05 +0000 |
| commit | 0bac34eec891080e2d0b9b4fc9e7b429a42064a3 (patch) | |
| tree | 28f3a43d652ee4e1fe90af9d0410ebcf01083b5e /src/name_canonicalization.cpp | |
| parent | 827cd45f04f2f86c59c67c549dbc44b33e1f2863 (diff) | |
Number fields within procedures with a depth-first numbering system
Diffstat (limited to 'src/name_canonicalization.cpp')
| -rw-r--r-- | src/name_canonicalization.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/name_canonicalization.cpp b/src/name_canonicalization.cpp index fd4e4b50f..b24bf9126 100644 --- a/src/name_canonicalization.cpp +++ b/src/name_canonicalization.cpp @@ -464,7 +464,10 @@ gb_internal void write_canonical_entity_name(TypeWriter *w, Entity *e) { if (s->decl_info != nullptr && s->decl_info->entity) { Entity *parent = s->decl_info->entity; write_canonical_parent_prefix(w, parent); - type_writer_append_fmt(w, CANONICAL_TYPE_SEPARATOR "[%d]", e->token.pos.offset); + if (e->scope->index > 0) { + type_writer_append_fmt(w, CANONICAL_TYPE_SEPARATOR "[%d]", e->scope->index); + } + // type_writer_append_fmt(w, CANONICAL_TYPE_SEPARATOR "[%d]", e->token.pos.offset); goto write_base_name; } else if ((s->flags & ScopeFlag_File) && s->file != nullptr) { |