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

Prefix operators should bind tighter than call #27

Open
brendanberg opened this issue Nov 14, 2018 · 1 comment
Open

Prefix operators should bind tighter than call #27

brendanberg opened this issue Nov 14, 2018 · 1 comment

Comments

@brendanberg
Copy link
Owner

The + prefix operator needs to bind before the method call.

>> +1(sqrt.)
   NameError: the Decimal '1.000000000000' does not have a method matching the selector '('+')'
>> (+1)(sqrt.)
   1.000000000000
@brendanberg
Copy link
Owner Author

Update: the + operator in the above example seems to be working, but - is a different story...

>> -1(sqrt.)
-1.0
>> (-1)(sqrt.)
ParseError: invalid decimal representation

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

No branches or pull requests

1 participant