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

Allow underscore in block return type even if the type can't be computed #10933

Merged

Conversation

asterite
Copy link
Member

Fixes #10932

Alternative to #10929

@straight-shoota
Copy link
Member

straight-shoota commented Jul 13, 2021

I'm a bit hesitant about merging such a compiler change last minute. But I suppose we might just postpone the release for another day or so to see if it creates any smoke 🤷
And it is probably the right thing to do, so we might as well do it now.

I can confirm this fixes the issue discovered in crinja (#10905 (comment)), so this fix is also an alternative to #10928.

@asterite
Copy link
Member Author

This fix makes the compiler not check a type where it previously did. Types are eventually checked when needed, anyway. So I'm 100% confident that this won't break anything.

@beta-ziliani
Copy link
Member

Either case we might break things (adding annotations, removing or changing them), so I say let's go with this better approach.

@straight-shoota straight-shoota added this to the 1.1.0 milestone Jul 13, 2021
@straight-shoota
Copy link
Member

test-ecosystem is green: https://github.com/crystal-lang/test-ecosystem/actions/runs/1026623854 👌

@beta-ziliani beta-ziliani merged commit 0ca1931 into master Jul 13, 2021
@straight-shoota straight-shoota deleted the bug/ignore-non-captured-block-returning-underscore branch July 13, 2021 18:27
This was referenced Jul 13, 2021
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.

Underscore return type in non-captured block doesn't work when the type can't be inferred
3 participants