@@ -901,35 +901,35 @@ BOOST_AUTO_TEST_CASE(function_modifier_invocation_local_variables)
901
901
BOOST_AUTO_TEST_CASE (legal_modifier_override)
902
902
{
903
903
char const * text = R"(
904
- contract A { modifier mod(uint a) {} }
905
- contract B is A { modifier mod(uint a) {} }
904
+ contract A { modifier mod(uint a) { _ } }
905
+ contract B is A { modifier mod(uint a) { _ } }
906
906
)" ;
907
907
BOOST_CHECK (success (text));
908
908
}
909
909
910
910
BOOST_AUTO_TEST_CASE (illegal_modifier_override)
911
911
{
912
912
char const * text = R"(
913
- contract A { modifier mod(uint a) {} }
914
- contract B is A { modifier mod(uint8 a) {} }
913
+ contract A { modifier mod(uint a) { _ } }
914
+ contract B is A { modifier mod(uint8 a) { _ } }
915
915
)" ;
916
916
BOOST_CHECK (expectError (text) == Error::Type::TypeError);
917
917
}
918
918
919
919
BOOST_AUTO_TEST_CASE (modifier_overrides_function)
920
920
{
921
921
char const * text = R"(
922
- contract A { modifier mod(uint a) {} }
923
- contract B is A { function mod(uint a) {} }
922
+ contract A { modifier mod(uint a) { _ } }
923
+ contract B is A { function mod(uint a) { } }
924
924
)" ;
925
925
BOOST_CHECK (expectError (text) == Error::Type::TypeError);
926
926
}
927
927
928
928
BOOST_AUTO_TEST_CASE (function_overrides_modifier)
929
929
{
930
930
char const * text = R"(
931
- contract A { function mod(uint a) {} }
932
- contract B is A { modifier mod(uint a) {} }
931
+ contract A { function mod(uint a) { } }
932
+ contract B is A { modifier mod(uint a) { _ } }
933
933
)" ;
934
934
BOOST_CHECK (expectError (text) == Error::Type::TypeError);
935
935
}
@@ -938,8 +938,8 @@ BOOST_AUTO_TEST_CASE(modifier_returns_value)
938
938
{
939
939
char const * text = R"(
940
940
contract A {
941
- function f(uint a) mod(2) returns (uint r) {}
942
- modifier mod(uint a) { return 7; }
941
+ function f(uint a) mod(2) returns (uint r) { }
942
+ modifier mod(uint a) { _ return 7; }
943
943
}
944
944
)" ;
945
945
BOOST_CHECK (expectError (text) == Error::Type::TypeError);
0 commit comments