mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Make fallback function throw by default.
This commit is contained in:
@@ -114,7 +114,7 @@ BOOST_AUTO_TEST_CASE(location_test)
|
||||
shared_ptr<string const> n = make_shared<string>("source");
|
||||
AssemblyItems items = compileContract(sourceCode);
|
||||
vector<SourceLocation> locations =
|
||||
vector<SourceLocation>(17, SourceLocation(2, 75, n)) +
|
||||
vector<SourceLocation>(18, SourceLocation(2, 75, n)) +
|
||||
vector<SourceLocation>(28, SourceLocation(20, 72, n)) +
|
||||
vector<SourceLocation>{SourceLocation(42, 51, n), SourceLocation(65, 67, n)} +
|
||||
vector<SourceLocation>(4, SourceLocation(58, 67, n)) +
|
||||
|
||||
@@ -2053,6 +2053,7 @@ BOOST_AUTO_TEST_CASE(contracts_as_addresses)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract helper {
|
||||
function() { } // can receive ether
|
||||
}
|
||||
contract test {
|
||||
helper h;
|
||||
@@ -5943,6 +5944,7 @@ BOOST_AUTO_TEST_CASE(reject_ether_sent_to_library)
|
||||
function f(address x) returns (bool) {
|
||||
return x.send(1);
|
||||
}
|
||||
function () {}
|
||||
}
|
||||
)";
|
||||
compileAndRun(sourceCode, 0, "lib");
|
||||
|
||||
Reference in New Issue
Block a user