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

Improve generics #1994

Merged
merged 4 commits into from
Sep 5, 2024
Merged

Improve generics #1994

merged 4 commits into from
Sep 5, 2024

Conversation

soutaro
Copy link
Member

@soutaro soutaro commented Sep 5, 2024

This PR implements two major improvements on generics.

  1. Generics upper bound now can be any type
  2. Generic type variable on module/class/interface/type alias can have default type
class Foo[T < Object? = String?]
end

@soutaro soutaro added this to the RBS 3.6 milestone Sep 5, 2024
@soutaro soutaro added this pull request to the merge queue Sep 5, 2024
@soutaro soutaro removed this pull request from the merge queue due to a manual request Sep 5, 2024
@soutaro soutaro added this pull request to the merge queue Sep 5, 2024
Merged via the queue into master with commit 236c845 Sep 5, 2024
19 checks passed
@soutaro soutaro deleted the generics/default-2 branch September 5, 2024 08:27
@ParadoxV5
Copy link
Contributor

https://github.com/ruby/rbs/blob/master/docs/syntax.md#generics needs to be updated

@ParadoxV5 ParadoxV5 mentioned this pull request Sep 6, 2024
@soutaro soutaro added the Released PRs already included in the released version label Sep 17, 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
Development

Successfully merging this pull request may close these issues.

2 participants