mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Check that contract inheriting from base with unimplemented constructor is abstract.
This commit is contained in:
parent
6fb27dee63
commit
766fa2fe85
@ -624,7 +624,12 @@ BOOST_AUTO_TEST_CASE(abstract_contract_constructor_args_optional)
|
||||
function foo() {}
|
||||
}
|
||||
)";
|
||||
ETH_TEST_REQUIRE_NO_THROW(parseAndAnalyse(text), "Parsing and name resolving failed");
|
||||
ETH_TEST_REQUIRE_NO_THROW(sourceUnit = parseAndAnalyse(text), "Parsing and name resolving failed");
|
||||
std::vector<ASTPointer<ASTNode>> nodes = sourceUnit->nodes();
|
||||
BOOST_CHECK_EQUAL(nodes.size(), 4);
|
||||
ContractDefinition* derived = dynamic_cast<ContractDefinition*>(nodes[3].get());
|
||||
BOOST_REQUIRE(derived);
|
||||
BOOST_CHECK(!derived->annotation().isFullyImplemented);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(abstract_contract_constructor_args_not_provided)
|
||||
|
Loading…
Reference in New Issue
Block a user