aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index a6c158a780..3ceda41934 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -3439,9 +3439,9 @@ static void add_top_level_decl(CodeGen *g, ScopeDecls *decls_scope, Tld *tld) {
if (is_export) {
g->resolve_queue.append(tld);
- auto entry = g->exported_symbol_names.put_unique(tld->name, tld->source_node);
+ auto entry = g->exported_symbol_names.put_unique(tld->name, tld);
if (entry) {
- AstNode *other_source_node = entry->value;
+ AstNode *other_source_node = entry->value->source_node;
ErrorMsg *msg = add_node_error(g, tld->source_node,
buf_sprintf("exported symbol collision: '%s'", buf_ptr(tld->name)));
add_error_note(g, msg, other_source_node, buf_sprintf("other symbol here"));