You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (type->contractDefinition() == *m_currentContract)
m_errorReporter.warning(_memberAccess.location(), "\"this\" used in constructor.");
The warning was implemented by checking that the static type of the LHS of a member access is the same as the contract being defined. But this wrongly catches other scenarios too such as:
pragma solidity^0.4.14;
contractFoo {
boolpublic bar;
function Foo(Foo other) public {
require(other.bar());
}
}
The text was updated successfully, but these errors were encountered:
One of the warnings emitted by the static analyzer is
"this" used in constructor
from #2605.solidity/libsolidity/analysis/StaticAnalyzer.cpp
Lines 210 to 211 in fe61435
The warning was implemented by checking that the static type of the LHS of a member access is the same as the contract being defined. But this wrongly catches other scenarios too such as:
The text was updated successfully, but these errors were encountered: