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

Improve for loop error #568

Merged
merged 1 commit into from
Dec 14, 2017
Merged

Conversation

DavidKnott
Copy link
Contributor

- What I did

Improve for loop error message. @khotkevych is is this error clearer?
Fixes #562

- How I did it

Looked at what caused the error and changed the error message to match it.

- How to verify it

Look at the error I changed.

- Description for the changelog

None

- Cute Animal Picture

image

@fubuloubu
Copy link
Member

I think @khotkevych's example actually still satisfies what the error message says, but it doesn't compile (and I don't think it should). The error message should probably say something more like "range only accepts positive, non-zero integers as arguments"

@DavidKnott
Copy link
Contributor Author

@fubuloubu It does satisfy the error message but the error that triggers the ones I changed is only when the number of iterations isn't fixed as different errors are triggered when num_iterations <= 0.

@fubuloubu
Copy link
Member

Ah, maybe something like "range only accepts literal values"

@jacqueswww
Copy link
Contributor

+1 for "range only accepts literal values"

@DavidKnott
Copy link
Contributor Author

Changed it to "range only accepts literal values," merging it in.

@DavidKnott DavidKnott merged commit af740fa into vyperlang:master Dec 14, 2017
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