From 9649c92e12aae22fe371fba34b35599654797f53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Venturo?= Date: Tue, 14 Jan 2020 18:52:01 -0300 Subject: [PATCH] Fix error message suggestion for receive --- libsolidity/parsing/Parser.cpp | 2 +- test/libsolidity/syntaxTests/fallback/old_syntax.sol | 2 +- test/libsolidity/syntaxTests/receiveEther/old_syntax.sol | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index 406226da4..be1ff115e 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -680,7 +680,7 @@ ASTPointer Parser::parseVariableDeclaration( fatalParserError( "Expected a state variable declaration. If you intended this as a fallback function " "or a function to handle plain ether transactions, use the \"fallback\" keyword " - "or the \"ether\" keyword instead." + "or the \"receive\" keyword instead." ); bool isIndexed = false; diff --git a/test/libsolidity/syntaxTests/fallback/old_syntax.sol b/test/libsolidity/syntaxTests/fallback/old_syntax.sol index 26297063b..88a45756c 100644 --- a/test/libsolidity/syntaxTests/fallback/old_syntax.sol +++ b/test/libsolidity/syntaxTests/fallback/old_syntax.sol @@ -2,4 +2,4 @@ contract C { function() external {} } // ---- -// ParserError: (37-38): Expected a state variable declaration. If you intended this as a fallback function or a function to handle plain ether transactions, use the "fallback" keyword or the "ether" keyword instead. +// ParserError: (37-38): Expected a state variable declaration. If you intended this as a fallback function or a function to handle plain ether transactions, use the "fallback" keyword or the "receive" keyword instead. diff --git a/test/libsolidity/syntaxTests/receiveEther/old_syntax.sol b/test/libsolidity/syntaxTests/receiveEther/old_syntax.sol index 52a2f5f17..ef50608d4 100644 --- a/test/libsolidity/syntaxTests/receiveEther/old_syntax.sol +++ b/test/libsolidity/syntaxTests/receiveEther/old_syntax.sol @@ -2,4 +2,4 @@ contract C { function() external payable {} } // ---- -// ParserError: (45-46): Expected a state variable declaration. If you intended this as a fallback function or a function to handle plain ether transactions, use the "fallback" keyword or the "ether" keyword instead. +// ParserError: (45-46): Expected a state variable declaration. If you intended this as a fallback function or a function to handle plain ether transactions, use the "fallback" keyword or the "receive" keyword instead.