diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-07-19 05:58:48 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-07-19 06:00:17 +0800 |
commit | 644de755dc480e97879ba9fd70684d09b275c6cc (patch) | |
tree | 724778f1b27918084041eee9bdc4ccabb8c979f8 | |
parent | 01fbc636239f78134b37f9dedeacf40455ee2e0c (diff) | |
download | dexon-solidity-644de755dc480e97879ba9fd70684d09b275c6cc.tar dexon-solidity-644de755dc480e97879ba9fd70684d09b275c6cc.tar.gz dexon-solidity-644de755dc480e97879ba9fd70684d09b275c6cc.tar.bz2 dexon-solidity-644de755dc480e97879ba9fd70684d09b275c6cc.tar.lz dexon-solidity-644de755dc480e97879ba9fd70684d09b275c6cc.tar.xz dexon-solidity-644de755dc480e97879ba9fd70684d09b275c6cc.tar.zst dexon-solidity-644de755dc480e97879ba9fd70684d09b275c6cc.zip |
Mark modifiers as internal
-rw-r--r-- | Changelog.md | 1 | ||||
-rw-r--r-- | libsolidity/ast/AST.h | 2 | ||||
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 14 |
3 files changed, 16 insertions, 1 deletions
diff --git a/Changelog.md b/Changelog.md index f43897a2..91ec7d0e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -10,6 +10,7 @@ Features: Bugfixes: * 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) diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h index cde14ea0..81ddc754 100644 --- a/libsolidity/ast/AST.h +++ b/libsolidity/ast/AST.h @@ -704,7 +704,7 @@ public: ASTPointer<ParameterList> const& _parameters, ASTPointer<Block> const& _body ): - CallableDeclaration(_location, _name, Visibility::Default, _parameters), + CallableDeclaration(_location, _name, Visibility::Internal, _parameters), Documented(_documentation), m_body(_body) { diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index cb39101e..649e7970 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -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\""); } +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() } |