diff options
author | Leonardo Alt <leo@ethereum.org> | 2018-12-12 19:03:59 +0800 |
---|---|---|
committer | Leonardo Alt <leo@ethereum.org> | 2018-12-12 21:43:44 +0800 |
commit | 508aae8a6709f4758753bb1e2ac1f613043c6750 (patch) | |
tree | 01039605827986d6881787bf38baa042a90b0638 /test | |
parent | 53537864a2b7322c58248ea8c9937d13aca7ca61 (diff) | |
download | dexon-solidity-508aae8a6709f4758753bb1e2ac1f613043c6750.tar.gz dexon-solidity-508aae8a6709f4758753bb1e2ac1f613043c6750.tar.zst dexon-solidity-508aae8a6709f4758753bb1e2ac1f613043c6750.zip |
Disable state mutability warning for functions with empty body
Diffstat (limited to 'test')
31 files changed, 0 insertions, 45 deletions
diff --git a/test/libsolidity/syntaxTests/functionTypes/valid_function_type_variables.sol b/test/libsolidity/syntaxTests/functionTypes/valid_function_type_variables.sol index e7d2c9a9..65198706 100644 --- a/test/libsolidity/syntaxTests/functionTypes/valid_function_type_variables.sol +++ b/test/libsolidity/syntaxTests/functionTypes/valid_function_type_variables.sol @@ -18,9 +18,3 @@ contract test { function(uint) pure internal h = fh; } // ---- -// Warning: (20-47): Function state mutability can be restricted to pure -// Warning: (52-81): Function state mutability can be restricted to pure -// Warning: (86-115): Function state mutability can be restricted to pure -// Warning: (120-149): Function state mutability can be restricted to pure -// Warning: (154-183): Function state mutability can be restricted to pure -// Warning: (188-217): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/004_reference_to_later_declaration.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/004_reference_to_later_declaration.sol index e112e16c..a554d3ab 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/004_reference_to_later_declaration.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/004_reference_to_later_declaration.sol @@ -3,4 +3,3 @@ contract test { function f() public {} } // ---- -// Warning: (53-75): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/009_type_checking_function_call.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/009_type_checking_function_call.sol index abe2beac..3872b1c3 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/009_type_checking_function_call.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/009_type_checking_function_call.sol @@ -3,4 +3,3 @@ contract test { function g(uint256, bool) public returns (uint256) { } } // ---- -// Warning: (88-142): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/049_function_external_call_allowed_conversion.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/049_function_external_call_allowed_conversion.sol index 2ca092db..bda0b946 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/049_function_external_call_allowed_conversion.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/049_function_external_call_allowed_conversion.sol @@ -7,4 +7,3 @@ contract Test { function g (C c) external {} } // ---- -// Warning: (113-141): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/051_function_internal_allowed_conversion.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/051_function_internal_allowed_conversion.sol index b5c5bf5a..5a9616ac 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/051_function_internal_allowed_conversion.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/051_function_internal_allowed_conversion.sol @@ -9,4 +9,3 @@ contract Test { } } // ---- -// Warning: (56-82): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/055_inheritance_diamond_basic.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/055_inheritance_diamond_basic.sol index c07e59e2..2e235ee0 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/055_inheritance_diamond_basic.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/055_inheritance_diamond_basic.sol @@ -5,5 +5,3 @@ contract derived is root, inter2, inter1 { function g() public { f(); rootFunction(); } } // ---- -// Warning: (16-49): Function state mutability can be restricted to pure -// Warning: (129-151): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/057_legal_override_direct.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/057_legal_override_direct.sol index 4f836baf..bf6459cb 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/057_legal_override_direct.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/057_legal_override_direct.sol @@ -1,5 +1,3 @@ contract B { function f() public {} } contract C is B { function f(uint i) public {} } // ---- -// Warning: (13-35): Function state mutability can be restricted to pure -// Warning: (56-84): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/058_legal_override_indirect.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/058_legal_override_indirect.sol index 8f3d268b..461bbbf2 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/058_legal_override_indirect.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/058_legal_override_indirect.sol @@ -2,5 +2,3 @@ contract A { function f(uint a) public {} } contract B { function f() public {} } contract C is A, B { } // ---- -// Warning: (13-41): Function state mutability can be restricted to pure -// Warning: (57-79): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/060_complex_inheritance.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/060_complex_inheritance.sol index c7e42238..ce3b622b 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/060_complex_inheritance.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/060_complex_inheritance.sol @@ -3,4 +3,3 @@ contract B { function f() public {} function g() public returns (uint8) {} } contract C is A, B { } // ---- // Warning: (35-42): Unused local variable. -// Warning: (95-133): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/096_access_to_default_function_visibility.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/096_access_to_default_function_visibility.sol index 9251df73..4f89e69e 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/096_access_to_default_function_visibility.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/096_access_to_default_function_visibility.sol @@ -5,4 +5,3 @@ contract d { function g() public { c(0).f(); } } // ---- -// Warning: (17-39): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/104_empty_name_input_parameter.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/104_empty_name_input_parameter.sol index 824543ef..af392402 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/104_empty_name_input_parameter.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/104_empty_name_input_parameter.sol @@ -2,4 +2,3 @@ contract test { function f(uint) public { } } // ---- -// Warning: (20-47): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/106_empty_name_return_parameter.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/106_empty_name_return_parameter.sol index a2ffc6e1..b524cd97 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/106_empty_name_return_parameter.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/106_empty_name_return_parameter.sol @@ -2,4 +2,3 @@ contract test { function f() public returns (bool) { } } // ---- -// Warning: (20-58): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/216_function_argument_storage_to_mem.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/216_function_argument_storage_to_mem.sol index 9785c25b..0f4388d0 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/216_function_argument_storage_to_mem.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/216_function_argument_storage_to_mem.sol @@ -6,4 +6,3 @@ contract C { } } // ---- -// Warning: (80-122): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/256_using_for_overload.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/256_using_for_overload.sol index 155281f5..f033b85b 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/256_using_for_overload.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/256_using_for_overload.sol @@ -11,4 +11,3 @@ contract C { } } // ---- -// Warning: (128-189): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/260_library_memory_struct.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/260_library_memory_struct.sol index 20d8afa5..ee5bcda9 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/260_library_memory_struct.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/260_library_memory_struct.sol @@ -5,4 +5,3 @@ library c { } // ---- // Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. -// Warning: (75-116): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/288_conditional_with_all_types.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/288_conditional_with_all_types.sol index e9ab08ba..a92c07f3 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/288_conditional_with_all_types.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/288_conditional_with_all_types.sol @@ -85,7 +85,5 @@ contract C { } // ---- // Warning: (1005-1019): This declaration shadows an existing declaration. -// Warning: (90-116): Function state mutability can be restricted to pure -// Warning: (121-147): Function state mutability can be restricted to pure // Warning: (257-642): Function state mutability can be restricted to pure // Warning: (647-1227): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/345_unused_return_value.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/345_unused_return_value.sol index 7f640505..109e8dfb 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/345_unused_return_value.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/345_unused_return_value.sol @@ -5,4 +5,3 @@ contract test { } } // ---- -// Warning: (20-57): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/376_inline_assembly_in_modifier.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/376_inline_assembly_in_modifier.sol index 0032f99e..87a7b28d 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/376_inline_assembly_in_modifier.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/376_inline_assembly_in_modifier.sol @@ -10,4 +10,3 @@ contract test { } } // ---- -// Warning: (122-151): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/403_return_structs.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/403_return_structs.sol index 2575954e..b4088068 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/403_return_structs.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/403_return_structs.sol @@ -7,4 +7,3 @@ contract C { } // ---- // Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. -// Warning: (112-164): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/parsing/empty_function.sol b/test/libsolidity/syntaxTests/parsing/empty_function.sol index d1027307..3f42e4e3 100644 --- a/test/libsolidity/syntaxTests/parsing/empty_function.sol +++ b/test/libsolidity/syntaxTests/parsing/empty_function.sol @@ -3,4 +3,3 @@ contract test { function functionName(bytes20 arg1, address addr) public view returns (int id) { } } // ---- -// Warning: (36-118): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/parsing/external_function.sol b/test/libsolidity/syntaxTests/parsing/external_function.sol index 3aa3ceec..0315b200 100644 --- a/test/libsolidity/syntaxTests/parsing/external_function.sol +++ b/test/libsolidity/syntaxTests/parsing/external_function.sol @@ -2,4 +2,3 @@ contract c { function x() external {} } // ---- -// Warning: (17-41): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/parsing/function_normal_comments.sol b/test/libsolidity/syntaxTests/parsing/function_normal_comments.sol index b61d104f..231be9c2 100644 --- a/test/libsolidity/syntaxTests/parsing/function_normal_comments.sol +++ b/test/libsolidity/syntaxTests/parsing/function_normal_comments.sol @@ -4,4 +4,3 @@ contract test { function functionName(bytes32 input) public returns (bytes32 out) {} } // ---- -// Warning: (75-143): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/parsing/function_type_as_storage_variable_with_assignment.sol b/test/libsolidity/syntaxTests/parsing/function_type_as_storage_variable_with_assignment.sol index c97bf4f9..42d8717a 100644 --- a/test/libsolidity/syntaxTests/parsing/function_type_as_storage_variable_with_assignment.sol +++ b/test/libsolidity/syntaxTests/parsing/function_type_as_storage_variable_with_assignment.sol @@ -3,4 +3,3 @@ contract test { function (uint, uint) internal returns (uint) f1 = f; } // ---- -// Warning: (20-73): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/parsing/function_type_in_expression.sol b/test/libsolidity/syntaxTests/parsing/function_type_in_expression.sol index b9ba65fb..000c2011 100644 --- a/test/libsolidity/syntaxTests/parsing/function_type_in_expression.sol +++ b/test/libsolidity/syntaxTests/parsing/function_type_in_expression.sol @@ -6,5 +6,4 @@ contract test { } // ---- // Warning: (108-156): Unused local variable. -// Warning: (20-73): Function state mutability can be restricted to pure // Warning: (78-167): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/parsing/library_simple.sol b/test/libsolidity/syntaxTests/parsing/library_simple.sol index 006ff307..c892e3ed 100644 --- a/test/libsolidity/syntaxTests/parsing/library_simple.sol +++ b/test/libsolidity/syntaxTests/parsing/library_simple.sol @@ -2,4 +2,3 @@ library Lib { function f() public { } } // ---- -// Warning: (18-41): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/parsing/modifier_invocation.sol b/test/libsolidity/syntaxTests/parsing/modifier_invocation.sol index cf986efe..6fa007c7 100644 --- a/test/libsolidity/syntaxTests/parsing/modifier_invocation.sol +++ b/test/libsolidity/syntaxTests/parsing/modifier_invocation.sol @@ -4,4 +4,3 @@ contract c { function f() public mod1(7) mod2 { } } // ---- -// Warning: (135-171): Function state mutability can be restricted to view diff --git a/test/libsolidity/syntaxTests/parsing/multiple_functions_natspec_documentation.sol b/test/libsolidity/syntaxTests/parsing/multiple_functions_natspec_documentation.sol index c236846c..ba090c53 100644 --- a/test/libsolidity/syntaxTests/parsing/multiple_functions_natspec_documentation.sol +++ b/test/libsolidity/syntaxTests/parsing/multiple_functions_natspec_documentation.sol @@ -10,7 +10,3 @@ contract test { function functionName4(bytes32 input) public returns (bytes32 out) {} } // ---- -// Warning: (74-143): Function state mutability can be restricted to pure -// Warning: (180-249): Function state mutability can be restricted to pure -// Warning: (281-350): Function state mutability can be restricted to pure -// Warning: (387-456): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/parsing/no_function_params.sol b/test/libsolidity/syntaxTests/parsing/no_function_params.sol index 5a024bdb..1f7c85a3 100644 --- a/test/libsolidity/syntaxTests/parsing/no_function_params.sol +++ b/test/libsolidity/syntaxTests/parsing/no_function_params.sol @@ -3,4 +3,3 @@ contract test { function functionName() public {} } // ---- -// Warning: (36-69): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/parsing/single_function_param.sol b/test/libsolidity/syntaxTests/parsing/single_function_param.sol index b64fffce..8dbac272 100644 --- a/test/libsolidity/syntaxTests/parsing/single_function_param.sol +++ b/test/libsolidity/syntaxTests/parsing/single_function_param.sol @@ -3,4 +3,3 @@ contract test { function functionName(bytes32 input) public returns (bytes32 out) {} } // ---- -// Warning: (36-104): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/parsing/visibility_specifiers.sol b/test/libsolidity/syntaxTests/parsing/visibility_specifiers.sol index db890b37..24071388 100644 --- a/test/libsolidity/syntaxTests/parsing/visibility_specifiers.sol +++ b/test/libsolidity/syntaxTests/parsing/visibility_specifiers.sol @@ -9,6 +9,3 @@ contract c { } // ---- // Warning: (58-71): This declaration shadows an existing declaration. -// Warning: (89-111): Function state mutability can be restricted to pure -// Warning: (116-144): Function state mutability can be restricted to pure -// Warning: (149-182): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/viewPureChecker/suggest_pure.sol b/test/libsolidity/syntaxTests/viewPureChecker/suggest_pure.sol index 87719eb3..5ec6d06f 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/suggest_pure.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/suggest_pure.sol @@ -2,4 +2,3 @@ contract C { function g() view public { } } // ---- -// Warning: (17-45): Function state mutability can be restricted to pure |