From 73495e0d0d483769ae2937868840854c15515eb2 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sun, 12 Jul 2026 17:50:32 +0200 Subject: Fix exporting non-public symbols --- boot/symbol.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'boot/symbol.cc') 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_bag::exported_symbols() const + { + if (!m_exported) + { + m_exported = std::make_shared(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) -- cgit v1.2.3