mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add "Only one receive function is allowed"-error to syntax tests
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
contract C {
|
||||
uint x;
|
||||
fallback() external { x = 2; }
|
||||
fallback() external { x = 3; }
|
||||
}
|
||||
// ----
|
||||
// DeclarationError 7301: (64-94): Only one fallback function is allowed.
|
||||
@@ -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.
|
||||
Reference in New Issue
Block a user