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

Am I missing something? #12

Closed
ghost opened this issue Nov 11, 2010 · 1 comment
Closed

Am I missing something? #12

ghost opened this issue Nov 11, 2010 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 11, 2010

On both OpenBSD amd64 and Snow Leopard I get the following.

[james@thinkpad potion]$ ./potion                                                                                                                                                                                  
>> add = (x, y): x + y.
=> function(x, y)
>> add(2, 4) string print
nil=> nil
>>

Is this expect behavior? I would think I would get 6 returned. All tests pass when I run make test yet calling a simple function doesn't?

@ghost
Copy link
Author

ghost commented Nov 11, 2010

Yes, this is expected behavior because the scope in which the interactive interpreter runs commands changes with each line. In your example, on the second line, add was nil. If you seperated the lines with a comma, it would work:
>> add = (x, y): x + y., add(2, 4) string print
6=> nil

fogus pushed a commit that referenced this issue May 22, 2013
Some systems do not bzero the stack memory.
Fixes some errors found with valgrind and AddressSanitizer
settuple, i.e. test/classes/monkey.pn works now
queilawithaQ pushed a commit to queilawithaQ/potion that referenced this issue Mar 26, 2021
Some systems do not bzero the stack memory.
Fixes some errors found with valgrind and AddressSanitizer
settuple, i.e. test/classes/monkey.pn works now
This issue was closed.
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

0 participants