From 7e0a291fac680fc9af269b4f7d8f3f4c51a4caee Mon Sep 17 00:00:00 2001 From: a3d4 Date: Fri, 17 Jul 2020 00:37:16 +0200 Subject: [PATCH] Add "Only one receive function is allowed"-error to syntax tests --- .../fallback_function_twice.sol} | 0 .../duplicateFunctions/receive_function_thrice.sol | 8 ++++++++ 2 files changed, 8 insertions(+) rename test/libsolidity/syntaxTests/{nameAndTypeResolution/078_fallback_function_twice.sol => duplicateFunctions/fallback_function_twice.sol} (100%) create mode 100644 test/libsolidity/syntaxTests/duplicateFunctions/receive_function_thrice.sol diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/078_fallback_function_twice.sol b/test/libsolidity/syntaxTests/duplicateFunctions/fallback_function_twice.sol similarity index 100% rename from test/libsolidity/syntaxTests/nameAndTypeResolution/078_fallback_function_twice.sol rename to test/libsolidity/syntaxTests/duplicateFunctions/fallback_function_twice.sol diff --git a/test/libsolidity/syntaxTests/duplicateFunctions/receive_function_thrice.sol b/test/libsolidity/syntaxTests/duplicateFunctions/receive_function_thrice.sol new file mode 100644 index 000000000..2160dc055 --- /dev/null +++ b/test/libsolidity/syntaxTests/duplicateFunctions/receive_function_thrice.sol @@ -0,0 +1,8 @@ +contract C { + receive() external payable { } + receive() external payable { } + receive() external payable { } +} +// ---- +// DeclarationError 4046: (52-82): Only one receive function is allowed. +// DeclarationError 4046: (87-117): Only one receive function is allowed.