Skip to content

add code tabs in TWO ca-given-imports.md #2824

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

Closed

Conversation

benluo
Copy link
Contributor

@benluo benluo commented May 27, 2023

No description provided.


#### Implement “equals” to make them really work

While these comparisons are now allowed, they will always be `false` because their `equals` methods don’t know how to make these comparisons.
Therefore, the solution is to override the `equals` methods for each class.
For instance, when you override the `equals` method for `AudioBook`:

{% tabs multiequ11 class=tabs-scala-version %}
{% tab 'Scala 2' %}
Copy link
Member

Choose a reason for hiding this comment

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

Same here.

@sjrd
Copy link
Member

sjrd commented May 31, 2023

Ping @scala/docs-zh.

Copy link
Contributor

@julienrf julienrf left a comment

Choose a reason for hiding this comment

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

Hey @benluo, thank you for the PR but since given imports and multiversal equality are features specific to Scala 3, we decided to label the whole page as “Scala 3 specific” instead of each code example (hence the absence of tabs on code snippets). You can see the guidelines here.

Could you please remove the tabs on the pages ca-given-imports and ca-multiversal-equality? Also in the future it would be easier to open separate PRs for changes in the documentation and changes in translations. Thank you!

Co-authored-by: Sébastien Doeraene <sjrdoeraene@gmail.com>
@benluo benluo closed this Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants