Skip to content

Improve generics - #1994

Merged
soutaro merged 4 commits into
masterfrom
generics/default-2
Sep 5, 2024
Merged

soutaro merged 4 commits into
masterfrom
generics/default-2

Conversation

@soutaro

@soutaro soutaro commented Sep 5, 2024

Copy link
Copy Markdown
Member

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 enabled auto-merge September 5, 2024 08:19
@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
@soutaro
soutaro deleted the generics/default-2 branch September 5, 2024 08:27
@ParadoxV5

Copy link
Copy Markdown
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants