MCPcopy Create free account
hub / github.com/argotorg/solidity / activateVariable

Method activateVariable

libsolidity/analysis/NameAndTypeResolver.cpp:176–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176void NameAndTypeResolver::activateVariable(std::string const& _name)
177{
178 solAssert(m_currentScope, "");
179 // Scoped local variables are invisible before activation.
180 // When a local variable is activated, its name is removed
181 // from a scope's invisible variables.
182 // This is used to avoid activation of variables of same name
183 // in the same scope (an error is returned).
184 if (m_currentScope->isInvisible(_name))
185 m_currentScope->activateVariable(_name);
186}
187
188std::vector<Declaration const*> NameAndTypeResolver::resolveName(ASTString const& _name, ASTNode const* _scope) const
189{

Callers 1

endVisitMethod · 0.45

Calls 1

isInvisibleMethod · 0.80

Tested by

no test coverage detected