-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Some Dotty compat for tests #3253
Some Dotty compat for tests #3253
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 on green
Codecov Report
@@ Coverage Diff @@
## master #3253 +/- ##
==========================================
+ Coverage 92.83% 93.05% +0.22%
==========================================
Files 375 376 +1
Lines 7392 7415 +23
Branches 202 202
==========================================
+ Hits 6862 6900 +38
+ Misses 530 515 -15
Continue to review full report at Codecov.
|
Dotty doesn't like local implicit vals without type annotations. I'm finally getting back to Dotty cross-building for tests after doing this for core and laws a few weeks back. In my view these changes are an improvement even on Scala 2.
The only non-trivial change is in
RepresentableSuite
, where there was some kind of weird code like this:The issue here is that
Representable.bimonad
has aRepresentable[Pair]
constraint, and theRepresentable[Pair]
instance has aFunctor[Pair]
constraint. ButbimonadInstance
is aFunctor[Pair]
. If you leave off the type annotation Scala is fine with this (because Scala), but if you put it on you get forward reference errors from the compiler. I've worked around this by invoking theRepresentable[X]
in an outer scope and assigning it to a non-implicit val.I've also removed the single bracket in
SemigroupKSuite
because some other weird stuff was happening that seems entirely unrelated to what's being tested there.