-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Port tests to Dotty (the 2nd) #3636
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3636 +/- ##
==========================================
- Coverage 90.28% 90.24% -0.05%
==========================================
Files 391 391
Lines 8872 8855 -17
Branches 251 256 +5
==========================================
- Hits 8010 7991 -19
- Misses 862 864 +2 |
test("hygiene") { | ||
trait FunctionK | ||
def optionToList[A](option: Option[A]): List[A] = option.toList | ||
val fOptionToList = cats.arrow.FunctionK.lift(optionToList _) | ||
forAll { (a: Option[Int]) => | ||
assert(fOptionToList(a) === (optionToList(a))) | ||
} | ||
} |
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.
@larsrh this trait FunctionK is not used here. I wonder is it left there intentionally or just an oversight? Could you clarify if you have time please? I wonder if I can simply remove this trait out or I should try to keep it but mark it as "unused" to suppress an "unused" compiler warning about this trait.
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.
That's on purpose, since it is a hygiene test. We're checking whether the macro uses the correct FunctionK
trait.
Supersedes #3552.
Lots of the ground work done by @LukaJCB. I just added a few commits.
@smarter writes:
I still think we should get this in sooner than later, because other development in
master
may easily break this again (see e.g. a449e16 which was caused by #3620).