zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit a7ddcabb5034f4fef90d266263611f6cfbe04f41 (tree)
parent 582fdc28691a8837af19ac1e9b3ad27ee2eeb315
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Fri,  1 Mar 2019 15:49:52 -0500

fix type names

Diffstat:
Msrc/ir.cpp | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/ir.cpp b/src/ir.cpp @@ -6612,8 +6612,8 @@ static Buf *get_anon_type_name(CodeGen *codegen, IrExecutable *exec, const char Scope *scope, AstNode *source_node) { if (exec->name) { - ZigPackage *cur_scope_pkg = scope_package(scope); - Buf *namespace_name = buf_create_from_buf(&cur_scope_pkg->pkg_path); + ZigType *import = get_scope_import(scope); + Buf *namespace_name = buf_create_from_buf(&import->name); if (buf_len(namespace_name) != 0) buf_append_char(namespace_name, NAMESPACE_SEP_CHAR); buf_append_buf(namespace_name, exec->name); return namespace_name; @@ -6625,8 +6625,8 @@ static Buf *get_anon_type_name(CodeGen *codegen, IrExecutable *exec, const char buf_appendf(name, ")"); return name; } else { - ZigPackage *cur_scope_pkg = scope_package(scope); - Buf *namespace_name = buf_create_from_buf(&cur_scope_pkg->pkg_path); + ZigType *import = get_scope_import(scope); + Buf *namespace_name = buf_create_from_buf(&import->name); if (buf_len(namespace_name) != 0) buf_append_char(namespace_name, NAMESPACE_SEP_CHAR); buf_appendf(namespace_name, "%s:%" ZIG_PRI_usize ":%" ZIG_PRI_usize, kind_name, source_node->line + 1, source_node->column + 1);