Improve error message for `log`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
Research direction
Reproduce the issue with the provided Console interface and trace the parser's handling of log as a reserved name. Add a regression test for this input and verify that the diagnostic identifies log as reserved for events instead of reporting only invalid syntax.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 5.2k
- Forks
- 914
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 25
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vyperlang/vyper
-
bug - type 0 bug - typechecker
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug - type 0 parser sev - low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100