Skip to content

Should validate self-type on Proc - #2192

Merged
soutaro merged 1 commit into
ruby:masterfrom
ksss:validate-proc-self-type
Dec 23, 2024
Merged

soutaro merged 1 commit into
ruby:masterfrom
ksss:validate-proc-self-type

Conversation

@ksss

@ksss ksss commented Dec 20, 2024

Copy link
Copy Markdown
Collaborator

Proc's self_type is not a validate target.

class Foo
  # validate pass
  def foo: () -> ^() [self: nothing] -> void
end

I fixed by including self_type in the checks for Types::Proc#{each_type,with_nonreturn_void?}.

@ParadoxV5

Copy link
Copy Markdown
Contributor

I’ve wondered how much code does RBS reuse on methods, blocks and procs.

@soutaro soutaro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@soutaro
soutaro added this pull request to the merge queue Dec 23, 2024
@soutaro soutaro added this to the RBS 3.8 milestone Dec 23, 2024
Merged via the queue into ruby:master with commit 393e2dd Dec 23, 2024
@ksss
ksss deleted the validate-proc-self-type branch December 23, 2024 02:48
@soutaro soutaro added the Released PRs already included in the released version label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Released PRs already included in the released version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants