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
infix usage of matchers #2036
Comments
@Lasering Do you have a compiler flag set perhaps that gets you that warning? Infix uses of methods not marked infix are not supposed to be deprecated until 3.1, not 3.0.
So for now you could perhaps turn off that flag, if you have one. If not let us know here. Meanwhile we will add those infix modifiers. Bill |
For those who want to compile code with scalacOptions:
It also fixes the |
Scala 2.13.6 included a number of syntax changes were added to simplify cross-building between Scala 2 and 3. Especially (for this issue):
At least for Scala 2.13(.6) and Scala 3 the source can be the same, helping with the migration. |
@Lasering We have added the open class for Any*Spec, I am not sure about the 2nd one 'Align leading infix operator with Scala 3 improvements', do you mind to clarify what we can do to improve this? |
@cheeseng I quoted the wrong line from the 2.13.6 release notes. The right one is:
This allows you to declare most of the matchers methods as infix, and thus solve the problem described in the opening post. |
Using scalatest 3.2.15 fixes this problem. |
Under Scala 3 the usage of Matchers is severely hindered (when using the compiler flag
-source future
),by the error:Probably all methods in AnyShouldWrapper, and in
ResultOf
traits should be declaredinfix
.The text was updated successfully, but these errors were encountered: