Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict usages of underscore #10125

Closed
wants to merge 5 commits into from
Closed

Restrict usages of underscore #10125

wants to merge 5 commits into from

Conversation

nc-x
Copy link
Contributor

@nc-x nc-x commented Dec 29, 2018

Closes #7171

cc @Araq @dom96 @mratsim

Note: I might have missed some places, so let me know if you know of any ;)

nc-x added 5 commits December 29, 2018 12:31
i.e.
```
const _ = 1
echo _      # Now an error
```
For eg.
```
type
  _ = object       # Error
```
For eg.
```
template _(): var int = i     # Error
```
```
type
  X = enum _      # Error
```
@nc-x
Copy link
Contributor Author

nc-x commented Dec 29, 2018

Note: nim check filename currently shows duplicate error messages for

type
  X = ref object           # (and also for ptr object)
    _: int 

which is fixed by this PR => #10107

@Araq
Copy link
Member

Araq commented Dec 30, 2018

Did you ensure this doesn't break arraymancer as I said in the issue?

@nc-x
Copy link
Contributor Author

nc-x commented Dec 30, 2018

Arraymancer breaks (as do the nim tests as seen in the CIs)
(╯°□°)╯︵ ┻━┻

@Araq
Copy link
Member

Araq commented Dec 30, 2018

Ok, will simply close #7171 instead. It's really a non-issue.

@Araq Araq closed this Dec 30, 2018
@nc-x
Copy link
Contributor Author

nc-x commented Dec 30, 2018

@Araq What about caa9274
Atleast it should be consistent for vars/lets and const
(Dunno if it breaks something)

@dom96
Copy link
Contributor

dom96 commented Dec 30, 2018

Shouldn't arraymancer use a different identifier? Using it to get something to work through some edge case seems like a big hack.

CC @mratsim @GULPF @andreaferretti

@nc-x nc-x deleted the underscore branch January 2, 2019 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants