aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-07-24 08:05:11 +0800
committerchriseth <chris@ethereum.org>2018-08-07 00:58:27 +0800
commitbd75d4268bd29b21cd92e557b7b126b33776ccea (patch)
tree8f1f3b5adba8a338f8cc6eda0664c36aac0f757c /libsolidity/ast
parent276724dedc32e8d30500dcb9927bcff708093067 (diff)
downloaddexon-solidity-bd75d4268bd29b21cd92e557b7b126b33776ccea.tar.gz
dexon-solidity-bd75d4268bd29b21cd92e557b7b126b33776ccea.tar.zst
dexon-solidity-bd75d4268bd29b21cd92e557b7b126b33776ccea.zip
Move fullyQualifiedName to ContractDefinition only
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/AST.cpp9
-rw-r--r--libsolidity/ast/AST.h4
2 files changed, 2 insertions, 11 deletions
diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp
index 7719d080..7c3869a8 100644
--- a/libsolidity/ast/AST.cpp
+++ b/libsolidity/ast/AST.cpp
@@ -347,15 +347,6 @@ string FunctionDefinition::externalSignature() const
return FunctionType(*this).externalSignature();
}
-string FunctionDefinition::fullyQualifiedName() const
-{
- auto const* contract = dynamic_cast<ContractDefinition const*>(scope());
- solAssert(contract, "Enclosing scope of function definition was not set.");
-
- auto fname = name().empty() ? "<fallback>" : name();
- return sourceUnitName() + ":" + contract->name() + "." + fname;
-}
-
FunctionDefinitionAnnotation& FunctionDefinition::annotation() const
{
if (!m_annotation)
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h
index 9ed3b9aa..d0d3b1ef 100644
--- a/libsolidity/ast/AST.h
+++ b/libsolidity/ast/AST.h
@@ -206,7 +206,6 @@ public:
bool isVisibleInDerivedContracts() const { return isVisibleInContract() && visibility() >= Visibility::Internal; }
bool isVisibleAsLibraryMember() const { return visibility() >= Visibility::Internal; }
- std::string fullyQualifiedName() const { return sourceUnitName() + ":" + name(); }
virtual bool isLValue() const { return false; }
virtual bool isPartOfExternalInterface() const { return false; }
@@ -406,6 +405,8 @@ public:
/// Returns the fallback function or nullptr if no fallback function was specified.
FunctionDefinition const* fallbackFunction() const;
+ std::string fullyQualifiedName() const { return sourceUnitName() + ":" + name(); }
+
virtual TypePointer type() const override;
virtual ContractDefinitionAnnotation& annotation() const override;
@@ -619,7 +620,6 @@ public:
std::vector<ASTPointer<ModifierInvocation>> const& modifiers() const { return m_functionModifiers; }
std::vector<ASTPointer<VariableDeclaration>> const& returnParameters() const { return m_returnParameters->parameters(); }
Block const& body() const { solAssert(m_body, ""); return *m_body; }
- std::string fullyQualifiedName() const;
virtual bool isVisibleInContract() const override
{
return Declaration::isVisibleInContract() && !isConstructor() && !isFallback();