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

Support type params for known signatures #1408

Merged
merged 1 commit into from
Aug 13, 2023

Conversation

ksss
Copy link
Collaborator

@ksss ksss commented Aug 1, 2023

$ bundle exec rbs prototype runtime 'Array' | head -n 1
class Array

$ bundle exec rbs prototype runtime 'Hash' | head -n 1
class Hash

But, class Array and class Hash are RBS raising RBS::GenericParameterMismatchError.

I propose giving type_params if it is a known type.

$ bundle exec rbs prototype runtime 'Array' | head -n 1
class Array[unchecked out Elem]

$ bundle exec rbs prototype runtime 'Hash' | head -n 1
class Hash[unchecked out K, unchecked out V]

This is useful for code that extends a core class such as ActiveSupport.

Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

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

👍

@soutaro
Copy link
Member

soutaro commented Aug 11, 2023

Can you resolve the conflicts? and it will be merged.

@soutaro soutaro enabled auto-merge August 11, 2023 13:57
@soutaro soutaro added this to the RBS 3.2 milestone Aug 11, 2023
auto-merge was automatically disabled August 11, 2023 14:21

Head branch was pushed to by a user without write access

@ksss ksss force-pushed the runtime-type-params branch from 650f8a7 to c236a4e Compare August 11, 2023 14:21
@ksss
Copy link
Collaborator Author

ksss commented Aug 11, 2023

Thank you for reviewing.
I resolved conflict. And please excuse force push.

@soutaro soutaro added this pull request to the merge queue Aug 13, 2023
Merged via the queue into ruby:master with commit d36ef0e Aug 13, 2023
@ksss ksss deleted the runtime-type-params branch August 13, 2023 01:52
@soutaro soutaro added the Released PRs already included in the released version label Aug 18, 2023
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
Development

Successfully merging this pull request may close these issues.

2 participants