aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/AST.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-11-20 01:02:04 +0800
committerchriseth <c@ethdev.com>2015-11-26 22:37:55 +0800
commit86495dfc57dde9b825ffd8c219ea809446e978f9 (patch)
tree99003d3865a0fbb9c08bd20c6b290f0702f31821 /libsolidity/ast/AST.cpp
parentc498dcce22b2921ee57f280da9117e491c021e1b (diff)
downloaddexon-solidity-86495dfc57dde9b825ffd8c219ea809446e978f9.tar.gz
dexon-solidity-86495dfc57dde9b825ffd8c219ea809446e978f9.tar.zst
dexon-solidity-86495dfc57dde9b825ffd8c219ea809446e978f9.zip
Make members context-sensitive.
Diffstat (limited to 'libsolidity/ast/AST.cpp')
-rw-r--r--libsolidity/ast/AST.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp
index 41a4d182..7ceab752 100644
--- a/libsolidity/ast/AST.cpp
+++ b/libsolidity/ast/AST.cpp
@@ -188,9 +188,9 @@ vector<Declaration const*> const& ContractDefinition::inheritableMembers() const
return *m_inheritableMembers;
}
-TypePointer ContractDefinition::type(ContractDefinition const* m_currentContract) const
+TypePointer ContractDefinition::type() const
{
- return make_shared<TypeType>(make_shared<ContractType>(*this), m_currentContract);
+ return make_shared<TypeType>(make_shared<ContractType>(*this));
}
ContractDefinitionAnnotation& ContractDefinition::annotation() const
@@ -207,7 +207,7 @@ TypeNameAnnotation& TypeName::annotation() const
return static_cast<TypeNameAnnotation&>(*m_annotation);
}
-TypePointer StructDefinition::type(ContractDefinition const*) const
+TypePointer StructDefinition::type() const
{
return make_shared<TypeType>(make_shared<StructType>(*this));
}
@@ -219,14 +219,14 @@ TypeDeclarationAnnotation& StructDefinition::annotation() const
return static_cast<TypeDeclarationAnnotation&>(*m_annotation);
}
-TypePointer EnumValue::type(ContractDefinition const*) const
+TypePointer EnumValue::type() const
{
auto parentDef = dynamic_cast<EnumDefinition const*>(scope());
solAssert(parentDef, "Enclosing Scope of EnumValue was not set");
return make_shared<EnumType>(*parentDef);
}
-TypePointer EnumDefinition::type(ContractDefinition const*) const
+TypePointer EnumDefinition::type() const
{
return make_shared<TypeType>(make_shared<EnumType>(*this));
}
@@ -238,7 +238,7 @@ TypeDeclarationAnnotation& EnumDefinition::annotation() const
return static_cast<TypeDeclarationAnnotation&>(*m_annotation);
}
-TypePointer FunctionDefinition::type(ContractDefinition const*) const
+TypePointer FunctionDefinition::type() const
{
return make_shared<FunctionType>(*this);
}
@@ -255,7 +255,7 @@ FunctionDefinitionAnnotation& FunctionDefinition::annotation() const
return static_cast<FunctionDefinitionAnnotation&>(*m_annotation);
}
-TypePointer ModifierDefinition::type(ContractDefinition const*) const
+TypePointer ModifierDefinition::type() const
{
return make_shared<ModifierType>(*this);
}
@@ -267,7 +267,7 @@ ModifierDefinitionAnnotation& ModifierDefinition::annotation() const
return static_cast<ModifierDefinitionAnnotation&>(*m_annotation);
}
-TypePointer EventDefinition::type(ContractDefinition const*) const
+TypePointer EventDefinition::type() const
{
return make_shared<FunctionType>(*this);
}
@@ -324,7 +324,7 @@ bool VariableDeclaration::canHaveAutoType() const
return (!!callable && !isCallableParameter());
}
-TypePointer VariableDeclaration::type(ContractDefinition const*) const
+TypePointer VariableDeclaration::type() const
{
return annotation().type;
}