mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #13685 from ethereum/graph-naming-corrections
Graph naming corrections
This commit is contained in:
commit
ce18dddd20
@ -663,13 +663,13 @@ public:
|
||||
UsingForDirective(
|
||||
int64_t _id,
|
||||
SourceLocation const& _location,
|
||||
std::vector<ASTPointer<IdentifierPath>> _functions,
|
||||
std::vector<ASTPointer<IdentifierPath>> _functionsOrLibrary,
|
||||
bool _usesBraces,
|
||||
ASTPointer<TypeName> _typeName,
|
||||
bool _global
|
||||
):
|
||||
ASTNode(_id, _location),
|
||||
m_functions(_functions),
|
||||
m_functionsOrLibrary(std::move(_functionsOrLibrary)),
|
||||
m_usesBraces(_usesBraces),
|
||||
m_typeName(std::move(_typeName)),
|
||||
m_global{_global}
|
||||
@ -683,13 +683,13 @@ public:
|
||||
TypeName const* typeName() const { return m_typeName.get(); }
|
||||
|
||||
/// @returns a list of functions or the single library.
|
||||
std::vector<ASTPointer<IdentifierPath>> const& functionsOrLibrary() const { return m_functions; }
|
||||
std::vector<ASTPointer<IdentifierPath>> const& functionsOrLibrary() const { return m_functionsOrLibrary; }
|
||||
bool usesBraces() const { return m_usesBraces; }
|
||||
bool global() const { return m_global; }
|
||||
|
||||
private:
|
||||
/// Either the single library or a list of functions.
|
||||
std::vector<ASTPointer<IdentifierPath>> m_functions;
|
||||
std::vector<ASTPointer<IdentifierPath>> m_functionsOrLibrary;
|
||||
bool m_usesBraces;
|
||||
ASTPointer<TypeName> m_typeName;
|
||||
bool m_global = false;
|
||||
|
@ -194,7 +194,7 @@ void UsingForDirective::accept(ASTVisitor& _visitor)
|
||||
{
|
||||
if (_visitor.visit(*this))
|
||||
{
|
||||
listAccept(functionsOrLibrary(), _visitor);
|
||||
listAccept(m_functionsOrLibrary, _visitor);
|
||||
if (m_typeName)
|
||||
m_typeName->accept(_visitor);
|
||||
}
|
||||
@ -205,7 +205,7 @@ void UsingForDirective::accept(ASTConstVisitor& _visitor) const
|
||||
{
|
||||
if (_visitor.visit(*this))
|
||||
{
|
||||
listAccept(functionsOrLibrary(), _visitor);
|
||||
listAccept(m_functionsOrLibrary, _visitor);
|
||||
if (m_typeName)
|
||||
m_typeName->accept(_visitor);
|
||||
}
|
||||
|
@ -1673,7 +1673,7 @@ BOOST_AUTO_TEST_CASE(using_for)
|
||||
contract C {
|
||||
using L for S;
|
||||
|
||||
function test() public {
|
||||
function pub() public {
|
||||
S memory s = S(42);
|
||||
|
||||
s.ext();
|
||||
@ -1693,8 +1693,8 @@ BOOST_AUTO_TEST_CASE(using_for)
|
||||
{"Entry", "function L.ext(struct S)"},
|
||||
}},
|
||||
{"C", {
|
||||
{"Entry", "function C.test()"},
|
||||
{"function C.test()", "function L.inr(struct S)"},
|
||||
{"Entry", "function C.pub()"},
|
||||
{"function C.pub()", "function L.inr(struct S)"},
|
||||
}},
|
||||
};
|
||||
|
||||
|
@ -6,5 +6,4 @@ contract C {
|
||||
y;
|
||||
}
|
||||
}
|
||||
// ---
|
||||
// ----
|
||||
|
Loading…
Reference in New Issue
Block a user