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

Merged
merged 1 commit into from
Dec 22, 2024
Merged

use & instead of with #4673

merged 1 commit into from
Dec 22, 2024

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 to me, thank you!

@satorg satorg merged commit 67566aa into typelevel:main Dec 22, 2024
16 checks passed
@xuwei-k xuwei-k deleted the with-syntax branch December 22, 2024 22:25
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.

3 participants