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

Fix expression value of constant assignment in interpreter #12016

Merged
merged 2 commits into from
Apr 27, 2022

Conversation

beta-ziliani
Copy link
Member

Fixes #12015
Original code by @asterite in #12015 (comment).

@beta-ziliani beta-ziliani added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:interpreter labels Apr 20, 2022
@straight-shoota
Copy link
Member

A spec would be nice.

@oprypin oprypin changed the title [Interpreter] Fix: constant assignmen [Interpreter] Fix: constant assignment Apr 20, 2022
@oprypin
Copy link
Member

oprypin commented Apr 20, 2022

FYI a nice way to convey authorship is adding this line to the bottom of the commit description:

Co-authored-by: Ary <...>

-this is what GitHub itself adds, there's no other special co-authorship feature that you wouldn't be able to reproduce.
Certainly looks better than appending "by @asterite"

I am excluding the email part from the above example (don't know what it helps to protect from spam, mostly superstition at this point...), so please go to Crystal repo and do git log to search and find out the full line.

@asterite
Copy link
Member

I think eventually we could change the behavior of assigning a constant in the REPL (not in interpreted mode) to evaluate the constant's value right away and return the value, but for now this change is fine :-)

@straight-shoota straight-shoota added this to the 1.5.0 milestone Apr 21, 2022
@straight-shoota straight-shoota merged commit 5836f6f into crystal-lang:master Apr 27, 2022
@straight-shoota straight-shoota changed the title [Interpreter] Fix: constant assignment Fix expression value of constant assignment in interpreter Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:interpreter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Interpreter] Can't define constants
4 participants