mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #7823 from ethereum/smt_typetype_msg
[SMTChecker] Do not visit the name of a modifier invocation
This commit is contained in:
commit
9ec44c2ec1
@ -537,6 +537,15 @@ void SMTEncoder::endVisit(FunctionCall const& _funCall)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SMTEncoder::visit(ModifierInvocation const& _node)
|
||||||
|
{
|
||||||
|
if (auto const* args = _node.arguments())
|
||||||
|
for (auto const& arg: *args)
|
||||||
|
if (arg)
|
||||||
|
arg->accept(*this);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void SMTEncoder::initContract(ContractDefinition const& _contract)
|
void SMTEncoder::initContract(ContractDefinition const& _contract)
|
||||||
{
|
{
|
||||||
solAssert(m_currentContract == nullptr, "");
|
solAssert(m_currentContract == nullptr, "");
|
||||||
@ -605,9 +614,7 @@ void SMTEncoder::endVisit(Identifier const& _identifier)
|
|||||||
defineExpr(_identifier, m_context.thisAddress());
|
defineExpr(_identifier, m_context.thisAddress());
|
||||||
m_uninterpretedTerms.insert(&_identifier);
|
m_uninterpretedTerms.insert(&_identifier);
|
||||||
}
|
}
|
||||||
else if (
|
else
|
||||||
_identifier.annotation().type->category() != Type::Category::Modifier
|
|
||||||
)
|
|
||||||
createExpr(_identifier);
|
createExpr(_identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,6 +82,7 @@ protected:
|
|||||||
bool visit(BinaryOperation const& _node) override;
|
bool visit(BinaryOperation const& _node) override;
|
||||||
void endVisit(BinaryOperation const& _node) override;
|
void endVisit(BinaryOperation const& _node) override;
|
||||||
void endVisit(FunctionCall const& _node) override;
|
void endVisit(FunctionCall const& _node) override;
|
||||||
|
bool visit(ModifierInvocation const& _node) override;
|
||||||
void endVisit(Identifier const& _node) override;
|
void endVisit(Identifier const& _node) override;
|
||||||
void endVisit(ElementaryTypeNameExpression const& _node) override;
|
void endVisit(ElementaryTypeNameExpression const& _node) override;
|
||||||
void endVisit(Literal const& _node) override;
|
void endVisit(Literal const& _node) override;
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
pragma experimental SMTChecker;
|
||||||
|
|
||||||
|
contract A {
|
||||||
|
uint x;
|
||||||
|
constructor() public {
|
||||||
|
x = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contract B is A {
|
||||||
|
constructor() A() public {
|
||||||
|
x = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Warning: (56-90): Assertion checker does not yet support constructors.
|
||||||
|
// Warning: (113-151): Assertion checker does not yet support constructors.
|
Loading…
Reference in New Issue
Block a user