mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Minor fixes after code review
This commit is contained in:
parent
c507d24a78
commit
1a8564545e
@ -29,7 +29,6 @@
|
|||||||
#include <stack>
|
#include <stack>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <variant>
|
|
||||||
|
|
||||||
namespace solidity::frontend
|
namespace solidity::frontend
|
||||||
{
|
{
|
||||||
|
@ -452,15 +452,15 @@ MemberList::MemberMap Type::boundFunctions(Type const& _type, ASTNode const& _sc
|
|||||||
};
|
};
|
||||||
|
|
||||||
for (UsingForDirective const* ufd: usingForDirectivesForType(_type, _scope))
|
for (UsingForDirective const* ufd: usingForDirectivesForType(_type, _scope))
|
||||||
for (auto const& [pathPointer, operator_]: ufd->functionsAndOperators())
|
for (auto const& [identifierPath, operator_]: ufd->functionsAndOperators())
|
||||||
{
|
{
|
||||||
if (operator_.has_value())
|
if (operator_.has_value())
|
||||||
// Functions used to define operators are not bound to the type.
|
// Functions used to define operators are not bound to the type.
|
||||||
// I.e. `using {f} for T` allows `T x; x.f()` but `using {f as +} for T` does not.
|
// I.e. `using {f} for T` allows `T x; x.f()` but `using {f as +} for T` does not.
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
solAssert(pathPointer);
|
solAssert(identifierPath);
|
||||||
Declaration const* declaration = pathPointer->annotation().referencedDeclaration;
|
Declaration const* declaration = identifierPath->annotation().referencedDeclaration;
|
||||||
solAssert(declaration);
|
solAssert(declaration);
|
||||||
|
|
||||||
if (ContractDefinition const* library = dynamic_cast<ContractDefinition const*>(declaration))
|
if (ContractDefinition const* library = dynamic_cast<ContractDefinition const*>(declaration))
|
||||||
@ -476,7 +476,7 @@ MemberList::MemberMap Type::boundFunctions(Type const& _type, ASTNode const& _sc
|
|||||||
else
|
else
|
||||||
addFunction(
|
addFunction(
|
||||||
dynamic_cast<FunctionDefinition const&>(*declaration),
|
dynamic_cast<FunctionDefinition const&>(*declaration),
|
||||||
pathPointer->path().back()
|
identifierPath->path().back()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user