Skip to content

Commit 69b71a2

Browse files
authored
evaluator: Prioritise local parameters over template parameters in AST node rvalue evaluation (#147)
Prioritize local parameters over template parameters in AST node rvalue evaluation
1 parent 7b4ff8e commit 69b71a2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/source/pl/core/ast/ast_node_rvalue.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ namespace pl::core::ast {
164164
}
165165

166166
{
167-
const auto &currScope = evaluator->getScope(0);
168-
std::copy(currScope.scope->begin(), currScope.scope->end(), std::back_inserter(searchScope));
167+
const auto &templateParameters = evaluator->getTemplateParameters();
168+
std::copy(templateParameters.begin(), templateParameters.end(), std::back_inserter(searchScope));
169169
}
170170

171171
{
172-
const auto &templateParameters = evaluator->getTemplateParameters();
173-
std::copy(templateParameters.begin(), templateParameters.end(), std::back_inserter(searchScope));
172+
const auto &currScope = evaluator->getScope(0);
173+
std::copy(currScope.scope->begin(), currScope.scope->end(), std::back_inserter(searchScope));
174174
}
175175

176176
for (const auto &part : this->getPath()) {

0 commit comments

Comments
 (0)