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 break without value from bot methods #398

Merged
merged 1 commit into from
Jul 14, 2021
Merged

Allow break without value from bot methods #398

merged 1 commit into from
Jul 14, 2021

Conversation

soutaro
Copy link
Owner

@soutaro soutaro commented Jul 14, 2021

This is a special case for break from #loop.

loop do
  break if foo
end
  1. The return type of #loop is bot, which implies the return value is not used
  2. It breaks without value == returning no value
  3. Hiding type error for that break would make sense 💡

@soutaro soutaro merged commit 6bd309b into master Jul 14, 2021
@soutaro soutaro deleted the bot-break branch July 14, 2021 17:23
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

Successfully merging this pull request may close these issues.

1 participant