Skip to content

Make scientific notation an invalid literal declaration#1681

Merged
charles-cooper merged 3 commits into
masterfrom
fubuloubu/1680-scientific-notation
Nov 12, 2019
Merged

Make scientific notation an invalid literal declaration#1681
charles-cooper merged 3 commits into
masterfrom
fubuloubu/1680-scientific-notation

Conversation

@fubuloubu

Copy link
Copy Markdown
Contributor

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
@fubuloubu fubuloubu requested a review from jacqueswww November 11, 2019 17:07

@jacqueswww jacqueswww left a comment

Copy link
Copy Markdown
Contributor

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