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

use & instead of with #4673

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

use & instead of with #4673

wants to merge 1 commit into from

Conversation

xuwei-k
Copy link
Contributor

@xuwei-k xuwei-k commented Nov 6, 2024

prepare latest Scala 3

Welcome to Scala 3.6.1 (21.0.5, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
                                                                                                                                                                                                                                                 
scala> trait A ; trait B
// defined trait A
// defined trait B

scala> def x: A with B = ???
1 warning found
-- [E003] Syntax Warning: ------------------------------------------------------
1 |def x: A with B = ???
  |         ^^^^
  |         with as a type operator has been deprecated; use & instead
  |
  | longer explanation available when compiling with `-explain`
def x: A & B
                                                                                                                                                                                                                                                 
scala> def x: A & B = ???
def x: A & B

@xuwei-k xuwei-k marked this pull request as ready for review December 1, 2024 22:26
@satorg satorg added the behind-the-scenes appreciated, but not user-facing label Dec 5, 2024
@satorg satorg requested review from satorg and danicheg December 5, 2024 03:30
Comment on lines +407 to +409
: NonEmptyAlternative[NonEmptyVector] & Bimonad[NonEmptyVector] & NonEmptyTraverse[NonEmptyVector] & Align[
NonEmptyVector
] =
Copy link
Contributor

Choose a reason for hiding this comment

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

Just for a record: this auto-formatting is hurting my eyes. I wonder if scalafmt can be configured to do better in such cases.

Comment on lines +31 to +33
implicit val catsStdInstancesForOption: Traverse[Option] & MonadError[Option, Unit] & Alternative[
Option
] & CommutativeMonad[Option] & CoflatMap[Option] & Align[Option] =
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, this one is even more baffling :(

Copy link
Contributor

@satorg satorg left a comment

Choose a reason for hiding this comment

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

Looks good for me, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
behind-the-scenes appreciated, but not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants