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

Make scientific notation an invalid literal declaration #1681

Merged
merged 3 commits into from
Nov 12, 2019

Conversation

fubuloubu
Copy link
Member

fixes: #1680

What I did

Raise InvalidLiteralException when scientific notation is used for a literal value (either for a constant, or in a method)

How I did it

WIP

How to verify it

Well, tests fail...

Description for the changelog

Added additional verification of literals to ensure scientific notation was not used (as Python interprets as a float)

Cute Animal Picture

cute birds

@fubuloubu fubuloubu added the work in progress Work on this PR or issue is not yet complete but reviewers are free to add their input for guidance. label Nov 7, 2019
@fubuloubu fubuloubu changed the title Make scientific notation an invalid literal declaration WIP Make scientific notation an invalid literal declaration Nov 7, 2019
@fubuloubu fubuloubu force-pushed the fubuloubu/1680-scientific-notation branch from 855dce2 to fd9f3d0 Compare November 11, 2019 16:39
@fubuloubu fubuloubu marked this pull request as ready for review November 11, 2019 17:06
@fubuloubu fubuloubu removed the work in progress Work on this PR or issue is not yet complete but reviewers are free to add their input for guidance. label Nov 11, 2019
@fubuloubu fubuloubu changed the title WIP Make scientific notation an invalid literal declaration Make scientific notation an invalid literal declaration Nov 11, 2019
Copy link
Contributor

@jacqueswww jacqueswww left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@charles-cooper charles-cooper merged commit f8d9f84 into master Nov 12, 2019
@fubuloubu fubuloubu deleted the fubuloubu/1680-scientific-notation branch November 12, 2019 18:35
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.

Vyper ignores scientific notation in decimal literals
3 participants