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

Relax need for block #1128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Relax need for block #1128

wants to merge 1 commit into from

Conversation

ksss
Copy link
Collaborator

@ksss ksss commented Oct 23, 2022

Deciding that block is essential is difficult and often wrong.

This method of following type signature,

def foo
  yield if block_given?
end

I expected to following.

def foo: () ?{ () -> untyped } -> untyped 

However, it is actually required because of the existence of yield.

def foo: () { () -> untyped } -> untyped 

Deciding that block is essential is difficult and often wrong.
```
def foo
  yield if block_given?
end
```
@ksss
Copy link
Collaborator Author

ksss commented Oct 24, 2022

Actual case ruby/gem_rbs_collection#16

@soutaro soutaro added this to the RBS 2.8.0 milestone Nov 7, 2022
@soutaro soutaro self-assigned this Nov 7, 2022
@ksss
Copy link
Collaborator Author

ksss commented Dec 16, 2022

@soutaro @pocke How about this?

@soutaro
Copy link
Member

soutaro commented Jan 4, 2023

#1180 improved this problem.

@soutaro soutaro closed this Jan 4, 2023
@ksss
Copy link
Collaborator Author

ksss commented Jan 4, 2023

@soutaro I don't think the problem has been improved.
Please see my comments #1180 (comment)

@soutaro soutaro reopened this Jan 4, 2023
@soutaro soutaro modified the milestones: RBS 2.8.0, RBS 2.8.x Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants