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

Method currentThis

libsolidity/analysis/GlobalContext.cpp:144–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144MagicVariableDeclaration const* GlobalContext::currentThis() const
145{
146 if (!m_thisPointer[m_currentContract])
147 {
148 Type const* type = TypeProvider::emptyTuple();
149 if (m_currentContract)
150 type = TypeProvider::contract(*m_currentContract);
151 m_thisPointer[m_currentContract] =
152 std::make_shared<MagicVariableDeclaration>(magicVariableToID("this"), "this", type);
153 }
154 return m_thisPointer[m_currentContract].get();
155}
156
157MagicVariableDeclaration const* GlobalContext::currentSuper() const
158{

Callers 3

visitMethod · 0.80
endVisitMethod · 0.80

Calls 2

magicVariableToIDFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected