Skip to content

Allow break without value from bot methods#398

Merged
soutaro merged 1 commit intomasterfrom
bot-break
Jul 14, 2021
Merged

Allow break without value from bot methods#398
soutaro merged 1 commit intomasterfrom
bot-break

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