fallback.sol 552 B

1234567891011121314
  1. contract test {
  2. int64 result = 102;
  3. function get() public returns (int64) {
  4. return result;
  5. }
  6. function() external {
  7. result = 356;
  8. }
  9. }
  10. // ---- Expect: diagnostics ----
  11. // error: 9:13-32: function is missing a name. A function without a name is syntax for 'fallback() external' or 'receive() external' in older versions of the Solidity language, see https://solang.readthedocs.io/en/latest/language/functions.html#fallback-and-receive-function