From c1722d9bf29ec30bb9934ef61c8b398eff809b4b Mon Sep 17 00:00:00 2001 From: Prabhat Sachdeva Date: Tue, 23 May 2023 20:47:55 +0530 Subject: [PATCH] fixed a linting error in action.cpp (#2844) There was a warning "Unchecked access to optional value" in this piece of code inside `action.cpp` ```cpp if (this->scope().has_value()) { out << " " << *this->scope();a } ``` Fixed it by accessing `scope_` directly rather than using `this->scope()`. --- explorer/interpreter/action.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/explorer/interpreter/action.cpp b/explorer/interpreter/action.cpp index 87f34007380d..c1ec94ce017e 100644 --- a/explorer/interpreter/action.cpp +++ b/explorer/interpreter/action.cpp @@ -152,8 +152,8 @@ void Action::Print(llvm::raw_ostream& out) const { } out << "]]"; } - if (this->scope().has_value()) { - out << " " << *this->scope(); + if (scope_.has_value()) { + out << " " << *scope_; } }