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

Interpreter: consider nodes without a type as NoReturn #12275

Merged
merged 2 commits into from
Jul 21, 2022

Conversation

asterite
Copy link
Member

Fixes #12270

I was a bit cautious in the past about nodes without a type, crashing the interpreter if that happened.

However, compiled Crystal deals with nodes without a type as if they were NoReturn, or nodes whose type size is zero. This PR changes the interpreter in some places to do that.

Ideally, compiled Crystal doesn't have nodes without types, but that's a larger change and I'd like to avoid making changes to compiled Crystal for now.

@asterite asterite added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:interpreter labels Jul 15, 2022
@straight-shoota straight-shoota added this to the 1.6.0 milestone Jul 20, 2022
@asterite asterite merged commit 94d0f2b into master Jul 21, 2022
@asterite asterite deleted the interpreter/block-arg-without-type branch July 21, 2022 09:55
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: Error: BUG: missing type for obj (Crystal::Var) from yaml serialization
2 participants