IronLanguages / IronLanguages/ironpython3
Incorrect error message with global assignment
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.8k
- Forks
- 316
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 1
Description
After https://github.com/IronLanguages/ironpython3/pull/500, the following raises the incorrect error message
def test():
global a
a = 1
global a
SyntaxError: name 'a' is used prior to global declaration
instead of the expected
SyntaxError: name 'a' is assigned to before global declaration
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.
Research direction
Reproduce the example from the issue and review the changes in pull request #500, which introduced the incorrect message. Trace the global-declaration error handling until the assigned-before-declaration case is distinguished from the used-before-declaration case, then verify that the example reports the expected SyntaxError message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, python
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100