mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #6636 from ethereum/smt_fix_constructor
[SMTChecker] Fix bad cast in base constructor modifier.
This commit is contained in:
commit
90f2fe6fd0
@ -7,6 +7,7 @@ Compiler Features:
|
|||||||
|
|
||||||
|
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
|
* SMTChecker: Fix bad cast in base constructor modifier.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,13 +101,18 @@ bool SMTChecker::visit(ModifierDefinition const&)
|
|||||||
|
|
||||||
bool SMTChecker::visit(FunctionDefinition const& _function)
|
bool SMTChecker::visit(FunctionDefinition const& _function)
|
||||||
{
|
{
|
||||||
|
m_functionPath.push_back(&_function);
|
||||||
|
m_modifierDepthStack.push_back(-1);
|
||||||
|
|
||||||
if (_function.isConstructor())
|
if (_function.isConstructor())
|
||||||
|
{
|
||||||
m_errorReporter.warning(
|
m_errorReporter.warning(
|
||||||
_function.location(),
|
_function.location(),
|
||||||
"Assertion checker does not yet support constructors."
|
"Assertion checker does not yet support constructors."
|
||||||
);
|
);
|
||||||
m_functionPath.push_back(&_function);
|
return false;
|
||||||
m_modifierDepthStack.push_back(-1);
|
}
|
||||||
|
|
||||||
// Not visited by a function call
|
// Not visited by a function call
|
||||||
if (isRootFunction())
|
if (isRootFunction())
|
||||||
{
|
{
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
pragma experimental SMTChecker;
|
||||||
|
contract C { constructor(uint) public {} }
|
||||||
|
contract A is C { constructor() C(2) public {} }
|
||||||
|
// ----
|
||||||
|
// Warning: (45-72): Assertion checker does not yet support constructors.
|
||||||
|
// Warning: (93-121): Assertion checker does not yet support constructors.
|
@ -0,0 +1,10 @@
|
|||||||
|
pragma experimental SMTChecker;
|
||||||
|
contract C { constructor(uint) public {} }
|
||||||
|
contract A is C { constructor() C(2) public {} }
|
||||||
|
contract B is C { constructor() C(3) public {} }
|
||||||
|
contract J is C { constructor() C(3) public {} }
|
||||||
|
// ----
|
||||||
|
// Warning: (45-72): Assertion checker does not yet support constructors.
|
||||||
|
// Warning: (93-121): Assertion checker does not yet support constructors.
|
||||||
|
// Warning: (142-170): Assertion checker does not yet support constructors.
|
||||||
|
// Warning: (191-219): Assertion checker does not yet support constructors.
|
Loading…
Reference in New Issue
Block a user