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

lexicial versus dynamic #645

Closed
albertvanderhorst opened this issue Aug 26, 2023 · 1 comment
Closed

lexicial versus dynamic #645

albertvanderhorst opened this issue Aug 26, 2023 · 1 comment

Comments

@albertvanderhorst
Copy link

albertvanderhorst commented Aug 26, 2023

The most straightforward and important test is missing for environments: the test whether environments are truely lexical


(def! a 12)
(def! fx (fn* () a)
(fx)
(def! a 2000)
(fx) 

My implementation gave 12, 2000 of (fx) and apparently this should be 12,12 .
So I have heard, but I could be mistaken. The more reason to put this test in.

@kanaka
Copy link
Owner

kanaka commented Aug 28, 2024

@albertvanderhorst That's a good test. The first call to fx should be 12, the second 2000 (because function creation should bind the current environment and def! I created a PR that includes another env binding test here: #677 so I'm going to close this issue now.

@kanaka kanaka closed this as completed Aug 28, 2024
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

2 participants