-
-
Notifications
You must be signed in to change notification settings - Fork 788
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
disallow changes to decimal precision #2479
disallow changes to decimal precision #2479
Conversation
we have a test for it
|
d2a6221
to
3ba5932
Compare
Codecov Report
@@ Coverage Diff @@
## master #2479 +/- ##
==========================================
- Coverage 84.53% 84.52% -0.02%
==========================================
Files 93 93
Lines 9223 9228 +5
Branches 2084 2085 +1
==========================================
+ Hits 7797 7800 +3
- Misses 938 939 +1
- Partials 488 489 +1
Continue to review full report at Codecov.
|
This pull request introduces 1 alert when merging 3ba5932 into c763d96 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the unused import and g2g
it is already set correctly in parser_utils.py. otherwise, literals like (-2**127 - 0.001) will silently have digits truncated.
3ba5932
to
d97a355
Compare
1925bad
to
30709fd
Compare
vyperlang/vyper#2479 disabled changes to the global decimal context to preserve compile-time constant semantics. This commit changes use of the global getcontext to a local context. It shouldn't change the behavior of the current code (since it didn't depend on modifying the global context, just having a local Context with the correct precision).
vyperlang/vyper#2479 disabled changes to the global decimal context to preserve compile-time constant semantics. This commit changes use of the global getcontext to a local context. It shouldn't change the behavior of the current code (since it didn't depend on modifying the global context, just having a local Context with the correct precision).
vyperlang/vyper#2479 disabled changes to the global decimal context to preserve compile-time constant semantics. This commit changes use of the global getcontext to a local context. It shouldn't change the behavior of the current code (since it didn't depend on modifying the global context, just having a local Context with the correct precision).
otherwise, literals like (-2**127 - 0.001) will silently have digits
truncated.
What I did
How I did it
How to verify it
Description for the changelog
Cute Animal Picture