@@ -445,7 +445,7 @@ ASR::symbol_t* import_from_module(Allocator &al, ASR::Module_t *m, SymbolTable *
445445 name.from_str (al, new_sym_name);
446446 char *cname = name.c_str (al);
447447 ASR::asr_t *fn = ASR::make_ExternalSymbol_t (
448- al, mfn-> base . base . loc ,
448+ al, loc,
449449 /* a_symtab */ current_scope,
450450 /* a_name */ cname,
451451 (ASR::symbol_t *)mfn,
@@ -461,7 +461,7 @@ ASR::symbol_t* import_from_module(Allocator &al, ASR::Module_t *m, SymbolTable *
461461 name.from_str (al, new_sym_name);
462462 char *cname = name.c_str (al);
463463 ASR::asr_t *est = ASR::make_ExternalSymbol_t (
464- al, st-> base . base . loc ,
464+ al, loc,
465465 /* a_symtab */ current_scope,
466466 /* a_name */ cname,
467467 (ASR::symbol_t *)st,
@@ -475,7 +475,7 @@ ASR::symbol_t* import_from_module(Allocator &al, ASR::Module_t *m, SymbolTable *
475475 name.from_str (al, new_sym_name);
476476 char *cname = name.c_str (al);
477477 ASR::asr_t *est = ASR::make_ExternalSymbol_t (
478- al, et-> base . base . loc ,
478+ al, loc,
479479 /* a_symtab */ current_scope,
480480 /* a_name */ cname,
481481 (ASR::symbol_t *)et,
@@ -491,7 +491,7 @@ ASR::symbol_t* import_from_module(Allocator &al, ASR::Module_t *m, SymbolTable *
491491 name.from_str (al, new_sym_name);
492492 char *cname = name.c_str (al);
493493 ASR::asr_t *v = ASR::make_ExternalSymbol_t (
494- al, mv-> base . base . loc ,
494+ al, loc,
495495 /* a_symtab */ current_scope,
496496 /* a_name */ cname,
497497 (ASR::symbol_t *)mv,
@@ -505,7 +505,7 @@ ASR::symbol_t* import_from_module(Allocator &al, ASR::Module_t *m, SymbolTable *
505505 name.from_str (al, new_sym_name);
506506 char *cname = name.c_str (al);
507507 ASR::asr_t *v = ASR::make_ExternalSymbol_t (
508- al, gt-> base . base . loc ,
508+ al, loc,
509509 /* a_symtab */ current_scope,
510510 /* a_name */ cname,
511511 (ASR::symbol_t *)gt,
@@ -4253,14 +4253,14 @@ class SymbolTableVisitor : public CommonVisitor<SymbolTableVisitor> {
42534253 }
42544254 std::string new_sym_name = ASRUtils::get_mangled_name (m, remote_sym);
42554255 ASR::symbol_t *t = import_from_module (al, m, current_scope, msym,
4256- remote_sym, new_sym_name, x.base . base .loc , true );
4256+ remote_sym, new_sym_name, x.m_names [i] .loc , true );
42574257 if (current_scope->get_scope ().find (new_sym_name) != current_scope->get_scope ().end ()) {
42584258 ASR::symbol_t *old_sym = current_scope->get_scope ().find (new_sym_name)->second ;
42594259 diag.add (diag::Diagnostic (
42604260 " The symbol '" + new_sym_name + " ' imported from " + std::string (m->m_name ) +" will shadow the existing symbol '" + new_sym_name + " '" ,
42614261 diag::Level::Warning, diag::Stage::Semantic, {
4262- diag::Label (" new symbol" , {x. m_names [i] .loc }),
4263- diag::Label (" old symbol implementation " , {old_sym ->base .loc }),
4262+ diag::Label (" old symbol" , {old_sym-> base .loc }),
4263+ diag::Label (" new symbol" , {t ->base .loc }),
42644264 })
42654265 );
42664266 current_scope->overwrite_symbol (new_sym_name, t);
0 commit comments