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

Compiler: don't skip all yield nodes if one is missing an exp type #8101

Merged

Conversation

asterite
Copy link
Member

Fixes #8100

It seems when some yield expression didn't have a type we would break out from the yield typing logic. It makes sense to skip that yield but not all yields. This essentially changes a return for a next in a nested loop, but because the logic was getting a bit large and confusing a method was extracted for the contents of one loop.

It seems when some yield expression didn't have a type we would break
out from the yield typing logic. It makes sense to skip that yield but
not all yields. This essentially changes a `return` for a `next` in a
nested loop, but because the logic was getting a bit large and confusing
a method was extracted for the contents of one loop.
@asterite asterite added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:semantic labels Aug 19, 2019
@asterite asterite added this to the 0.31.0 milestone Aug 21, 2019
@asterite asterite merged commit adafaf6 into crystal-lang:master Aug 21, 2019
@asterite asterite deleted the bug/8100-yield-exp-without-type branch August 21, 2019 10:38
dnamsons pushed a commit to dnamsons/crystal that referenced this pull request Jan 10, 2020
…rystal-lang#8101)

It seems when some yield expression didn't have a type we would break
out from the yield typing logic. It makes sense to skip that yield but
not all yields. This essentially changes a `return` for a `next` in a
nested loop, but because the logic was getting a bit large and confusing
a method was extracted for the contents of one loop.
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:semantic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crystal v0.30.1 and v0.30.0 segfaults on a specific code base
2 participants