diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-03-01 15:49:52 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-03-01 15:49:52 -0500 |
| commit | a7ddcabb5034f4fef90d266263611f6cfbe04f41 (patch) | |
| tree | 306aaa6d3f5db0fe6aa8cb11842ad84597be47ca /src/ir.cpp | |
| parent | 582fdc28691a8837af19ac1e9b3ad27ee2eeb315 (diff) | |
| download | zig-a7ddcabb5034f4fef90d266263611f6cfbe04f41.tar.gz zig-a7ddcabb5034f4fef90d266263611f6cfbe04f41.zip | |
fix type names
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 70244ff049..dc5f38e6f3 100644 --- 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); |
