Skip to content

don't fold exponentiation when power < 0#2089

Merged
iamdefinitelyahuman merged 1 commit into
vyperlang:masterfrom
iamdefinitelyahuman:fix-folding-exponents
Jul 3, 2020
Merged

don't fold exponentiation when power < 0#2089
iamdefinitelyahuman merged 1 commit into
vyperlang:masterfrom
iamdefinitelyahuman:fix-folding-exponents

Conversation

@iamdefinitelyahuman

Copy link
Copy Markdown
Contributor

What I did

Don't fold literal exponentiation when the power is negative.

Fixes #1926 - which was mostly already fixed by type checking, but it alerted me to this issue.

How to verify it

Run tests.

Cute Animal Picture

image

@iamdefinitelyahuman iamdefinitelyahuman merged commit 5a78383 into vyperlang:master Jul 3, 2020
@iamdefinitelyahuman iamdefinitelyahuman deleted the fix-folding-exponents branch July 3, 2020 22:18
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.

Raising to a negative number raises CompilerPanic

2 participants