CLI2: Fixed bug where a reference was being copied over
This commit is contained in:
@@ -1311,10 +1311,10 @@ void CLI2::desugarFilterPlainArgs ()
|
|||||||
{
|
{
|
||||||
bool changes = false;
|
bool changes = false;
|
||||||
std::vector <A2> reconstructed;
|
std::vector <A2> reconstructed;
|
||||||
auto& prev = _args[0];
|
auto prev = &_args[0];
|
||||||
for (auto& a : _args)
|
for (auto& a : _args)
|
||||||
{
|
{
|
||||||
if (prev._lextype != Lexer::Type::op &&
|
if (prev->_lextype != Lexer::Type::op &&
|
||||||
a.hasTag ("FILTER") &&
|
a.hasTag ("FILTER") &&
|
||||||
(a._lextype == Lexer::Type::dom ||
|
(a._lextype == Lexer::Type::dom ||
|
||||||
a._lextype == Lexer::Type::identifier ||
|
a._lextype == Lexer::Type::identifier ||
|
||||||
@@ -1342,7 +1342,7 @@ void CLI2::desugarFilterPlainArgs ()
|
|||||||
else
|
else
|
||||||
reconstructed.push_back (a);
|
reconstructed.push_back (a);
|
||||||
|
|
||||||
prev = a;
|
prev = &a;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changes)
|
if (changes)
|
||||||
|
|||||||
Reference in New Issue
Block a user