aboutsummaryrefslogtreecommitdiff
path: root/boot/symbol.cc
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-07-12 17:50:32 +0200
committerEugen Wissner <belka@caraus.de>2026-07-12 17:50:32 +0200
commit73495e0d0d483769ae2937868840854c15515eb2 (patch)
tree5808cefa476e6b4a0e682153401e2c434aedfa3e /boot/symbol.cc
parent768537d6e4b82a19e77b7e44234309ecaf4d65d2 (diff)
downloadelna-73495e0d0d483769ae2937868840854c15515eb2.tar.gz
Fix exporting non-public symbols
Diffstat (limited to 'boot/symbol.cc')
-rw-r--r--boot/symbol.cc18
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)