diff --git a/src/anthem/ASTUtils.cpp b/src/anthem/ASTUtils.cpp index 61cb799..4ae6d4d 100644 --- a/src/anthem/ASTUtils.cpp +++ b/src/anthem/ASTUtils.cpp @@ -55,7 +55,7 @@ bool VariableStack::contains(const ast::VariableDeclaration &variableDeclaration const auto variableDeclarationMatches = [&variableDeclaration](const auto &other) { - return variableDeclaration.name == other->name; + return &variableDeclaration == other.get(); }; const auto layerContainsVariableDeclaration =