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

Force users to initialize variables. #1597

Merged
merged 10 commits into from
Sep 27, 2019

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Sep 3, 2019

What I did

Fix #1493

How I did it

Disallow uninitialized variables

How to verify it

Description for the changelog

Disallow declaring variables without initialization

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@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 Sep 10, 2019
@iamdefinitelyahuman
Copy link
Contributor

Note to self: once this merges, update #1613 with ZERO_WEI environmental var

@charles-cooper
Copy link
Member Author

Thanks to great contributions from @iamdefinitelyahuman , tests have been updated to pass after this new restriction.

@charles-cooper charles-cooper changed the title WIP: Force users to initialize variables. Force users to initialize variables. Sep 24, 2019
@charles-cooper charles-cooper 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 Sep 24, 2019
vyper/parser/stmt.py Outdated Show resolved Hide resolved
tests/parser/features/test_packing.py Show resolved Hide resolved
vyper/parser/stmt.py Show resolved Hide resolved
vyper/parser/expr.py Show resolved Hide resolved
charles-cooper and others added 2 commits September 24, 2019 18:49
according to review comment

Co-Authored-By: Bryant Eisenbach <fubuloubu@gmail.com>
@fubuloubu
Copy link
Member

Waiting on review from one of @iamdefinitelyahuman, @jacqueswww or @davesque

Copy link
Contributor

@iamdefinitelyahuman iamdefinitelyahuman left a comment

Choose a reason for hiding this comment

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

There are a few issues in the tests that are passing because of #1624 or because the test was already expected to fail. Will fix.

tests/parser/features/test_assignment.py Outdated Show resolved Hide resolved
tests/parser/features/test_assignment.py Outdated Show resolved Hide resolved
tests/parser/syntax/test_list.py Outdated Show resolved Hide resolved
tests/parser/syntax/test_logging.py Outdated Show resolved Hide resolved
charles-cooper and others added 2 commits September 27, 2019 09:24
Co-Authored-By: Ben Hauser <35276322+iamdefinitelyahuman@users.noreply.github.com>
Co-Authored-By: Ben Hauser <35276322+iamdefinitelyahuman@users.noreply.github.com>
Copy link
Contributor

@iamdefinitelyahuman iamdefinitelyahuman left a comment

Choose a reason for hiding this comment

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

LGTM

@fubuloubu fubuloubu merged commit d996afa into vyperlang:master Sep 27, 2019
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.

VIP: Specify behavior of uninitialized variables
3 participants