mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2597 from ethereum/modifier-internal
Mark modifiers as internal
This commit is contained in:
commit
becb7af4a2
@ -10,6 +10,7 @@ Features:
|
|||||||
|
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
* Type Checker: Fix invalid "specify storage keyword" warning for reference members of structs.
|
* Type Checker: Fix invalid "specify storage keyword" warning for reference members of structs.
|
||||||
|
* Type Checker: Mark modifiers as internal.
|
||||||
|
|
||||||
|
|
||||||
### 0.4.13 (2017-07-06)
|
### 0.4.13 (2017-07-06)
|
||||||
|
@ -704,7 +704,7 @@ public:
|
|||||||
ASTPointer<ParameterList> const& _parameters,
|
ASTPointer<ParameterList> const& _parameters,
|
||||||
ASTPointer<Block> const& _body
|
ASTPointer<Block> const& _body
|
||||||
):
|
):
|
||||||
CallableDeclaration(_location, _name, Visibility::Default, _parameters),
|
CallableDeclaration(_location, _name, Visibility::Internal, _parameters),
|
||||||
Documented(_documentation),
|
Documented(_documentation),
|
||||||
m_body(_body)
|
m_body(_body)
|
||||||
{
|
{
|
||||||
|
@ -6359,6 +6359,20 @@ BOOST_AUTO_TEST_CASE(explicit_literal_to_storage_string)
|
|||||||
CHECK_ERROR(text, TypeError, "Explicit type conversion not allowed from \"literal_string \"abc\"\" to \"string storage pointer\"");
|
CHECK_ERROR(text, TypeError, "Explicit type conversion not allowed from \"literal_string \"abc\"\" to \"string storage pointer\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(modifiers_access_storage_pointer)
|
||||||
|
{
|
||||||
|
char const* text = R"(
|
||||||
|
contract C {
|
||||||
|
struct S { }
|
||||||
|
modifier m(S storage x) {
|
||||||
|
x;
|
||||||
|
_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)";
|
||||||
|
CHECK_SUCCESS_NO_WARNINGS(text);
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE_END()
|
BOOST_AUTO_TEST_SUITE_END()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user