mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add test and changelog
This commit is contained in:
parent
b3db1c361c
commit
e506129aee
@ -7,6 +7,7 @@ Features:
|
||||
* Type Checker: Disallow value transfers to contracts without a payable fallback function.
|
||||
* Type Checker: Include types in explicit conversion error message.
|
||||
* Type Checker: Raise proper error for arrays too large for ABI encoding.
|
||||
* Type checker: Warn if using ``this`` in a constructor.
|
||||
|
||||
Bugfixes:
|
||||
* Type Checker: Fix invalid "specify storage keyword" warning for reference members of structs.
|
||||
|
@ -4506,7 +4506,7 @@ BOOST_AUTO_TEST_CASE(var_handle_divided_integers)
|
||||
}
|
||||
}
|
||||
)";
|
||||
CHECK_SUCCESS(text);
|
||||
CHECK_SUCCESS(text);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(rational_bitnot_unary_operation)
|
||||
@ -6373,6 +6373,20 @@ BOOST_AUTO_TEST_CASE(modifiers_access_storage_pointer)
|
||||
CHECK_SUCCESS_NO_WARNINGS(text);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(using_this_in_constructor)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract C {
|
||||
function C() {
|
||||
this.f();
|
||||
}
|
||||
function f() {
|
||||
}
|
||||
}
|
||||
)";
|
||||
CHECK_WARNING(text, "\"this\" used in constructor");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user