Merge pull request #9918 from ethereum/isStateScopeCheck

Make isStateVariable regular scope check.
This commit is contained in:
Harikrishnan Mulackal
2020-09-29 09:33:03 +02:00
committed by GitHub
4 changed files with 6 additions and 6 deletions
+5
View File
@@ -642,6 +642,11 @@ bool VariableDeclaration::hasReferenceOrMappingType() const
return type->category() == Type::Category::Mapping || dynamic_cast<ReferenceType const*>(type);
}
bool VariableDeclaration::isStateVariable() const
{
return dynamic_cast<ContractDefinition const*>(scope());
}
set<VariableDeclaration::Location> VariableDeclaration::allowedDataLocations() const
{
using Location = VariableDeclaration::Location;