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

Rename generic class params #594

Merged
merged 2 commits into from
Feb 12, 2021
Merged

Rename generic class params #594

merged 2 commits into from
Feb 12, 2021

Conversation

soutaro
Copy link
Member

@soutaro soutaro commented Feb 11, 2021

Opening generic classes/modules with different parameter names caused a problem that the parameters will be left after a type application. Renaming the type parameters of methods/instance variables solves the problem.

class Foo[A]
  def get: () -> A
end

class Foo[B]        # Use different parameter name.
  def set: (B) -> B
end

# What is the type of Foo[Integer]#set ???

@soutaro soutaro merged commit e0b0d4e into master Feb 12, 2021
@soutaro soutaro deleted the rename-generic-class-params branch February 12, 2021 02:23
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.

1 participant