Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix typo in distinguishingProperty variable name (#15763)
Browse files Browse the repository at this point in the history
* Update FilesystemUtils.cpp

* Update OverrideChecker.cpp
kilavvy authored and aarlt committed Jan 28, 2025
1 parent a389646 commit 799d106
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libsolidity/analysis/OverrideChecker.cpp
Original file line number Diff line number Diff line change
@@ -801,7 +801,7 @@ void OverrideChecker::checkAmbiguousOverridesInternal(std::set<OverrideProxy> _b
std::string callableName = _baseCallables.begin()->astNodeName();
if (_baseCallables.begin()->isVariable())
callableName = "function";
std::string distinguishigProperty = _baseCallables.begin()->distinguishingProperty();
std::string distinguishingProperty = _baseCallables.begin()->distinguishingProperty();

bool foundVariable = false;
for (auto const& base: _baseCallables)
@@ -811,7 +811,7 @@ void OverrideChecker::checkAmbiguousOverridesInternal(std::set<OverrideProxy> _b
std::string message =
"Derived contract must override " + callableName + " \"" +
_baseCallables.begin()->name() +
"\". Two or more base classes define " + callableName + " with same " + distinguishigProperty + ".";
"\". Two or more base classes define " + callableName + " with same " + distinguishingProperty + ".";

if (foundVariable)
message +=
4 changes: 2 additions & 2 deletions test/FilesystemUtils.cpp
Original file line number Diff line number Diff line change
@@ -44,12 +44,12 @@ void solidity::test::createFilesWithParentDirs(std::set<boost::filesystem::path>
void solidity::test::createFileWithContent(boost::filesystem::path const& _path, std::string const& _content)
{
if (boost::filesystem::is_regular_file(_path))
BOOST_THROW_EXCEPTION(std::runtime_error("File already exists: \"" + _path.string() + "\".")); \
BOOST_THROW_EXCEPTION(std::runtime_error("File already exists: \"" + _path.string() + "\"."));

// Use binary mode to avoid line ending conversion on Windows.
std::ofstream newFile(_path.string(), std::ofstream::binary);
if (newFile.fail() || !boost::filesystem::is_regular_file(_path))
BOOST_THROW_EXCEPTION(std::runtime_error("Failed to create a file: \"" + _path.string() + "\".")); \
BOOST_THROW_EXCEPTION(std::runtime_error("Failed to create a file: \"" + _path.string() + "\"."));

newFile << _content;
}

0 comments on commit 799d106

Please sign in to comment.