mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix error message suggestion for receive
This commit is contained in:
parent
b3fe84a6ea
commit
9649c92e12
@ -680,7 +680,7 @@ ASTPointer<VariableDeclaration> 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;
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user