vyperlang / vyper

Pythonic Smart Contract Language for the EVM
https://vyperlang.org
Other
4.91k stars 804 forks source link

Improve error message for `log` #4306

Open pcaversaccio opened 1 month ago

pcaversaccio commented 1 month ago

We should improve the error message if log is used (reserved due to events):

interface Console:
    def log(str: String[400], x: uint256): view
invalid syntax (<unknown>, line 21)

  line 21:9 
       20 interface Console:
  ---> 21     def log(str: String[400], x: uint256): view
  -----------------^
       22

Something like this would be better:

invalid syntax: `log` is a reserved keyword used for events.