File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
include/Ark/Compiler/NameResolution
tests/unittests/resources/NameResolutionSuite/basic Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ namespace Ark::internal
8282 [[nodiscard]] inline virtual bool isGlob () const { return false ; }
8383 [[nodiscard]] inline virtual std::string prefix () const { return " " ; }
8484 [[nodiscard]] inline virtual bool hasSymbol (const std::string&) const { return false ; }
85- [[nodiscard]] inline virtual bool recursiveHasSymbol (const std::string&) const { return false ; }
85+ [[nodiscard]] inline virtual bool recursiveHasSymbol (const std::string&) { return false ; }
8686
8787 private:
8888 std::unordered_set<Declaration> m_vars {};
@@ -128,9 +128,9 @@ namespace Ark::internal
128128 [[nodiscard]] inline bool isGlob () const override { return m_is_glob; }
129129 [[nodiscard]] inline std::string prefix () const override { return m_namespace; }
130130 [[nodiscard]] inline bool hasSymbol (const std::string& symbol) const override { return std::ranges::find (m_symbols, symbol) != m_symbols.end (); }
131- [[nodiscard]] inline bool recursiveHasSymbol (const std::string& symbol) const override
131+ [[nodiscard]] inline bool recursiveHasSymbol (const std::string& symbol) override
132132 {
133- if (hasSymbol (symbol))
133+ if (hasSymbol (symbol) || ( isGlob () && get (symbol, false ). has_value ()) )
134134 return true ;
135135 for (const auto & saved_scope : m_additional_namespaces)
136136 {
Original file line number Diff line number Diff line change 99
1010(let b_foo_ok (= "aa aaa" (b:foo "aa" "aaa")))
1111
12- (let c_ok (and (= "c:egg" c: egg) (= "c:bacon" c: bacon)))
12+ (let c_ok (and (= "c:egg" egg) (= "c:bacon" bacon)))
1313
1414(let d_ok (= "d:lamp" lamp))
You can’t perform that action at this time.
0 commit comments