diff options
Diffstat (limited to 'boot')
| -rw-r--r-- | boot/symbol.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/boot/symbol.cc b/boot/symbol.cc index 9052b23..d7ceacb 100644 --- a/boot/symbol.cc +++ b/boot/symbol.cc @@ -457,7 +457,23 @@ namespace elna::boot void symbol_bag::add_import(const symbol_bag& bag) { - this->imports.push_front(bag.symbols); + this->imports.push_front(bag.exported_symbols()); + } + + std::shared_ptr<symbol_table> symbol_bag::exported_symbols() const + { + if (!m_exported) + { + m_exported = std::make_shared<symbol_table>(symbols->scope()); + for (const auto& [name, info] : *symbols) + { + if (info->exported) + { + m_exported->enter(name, info); + } + } + } + return m_exported; } type inner_aliased_type(std::shared_ptr<alias_type> alias) |
