Skip to content

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

Merged
merged 18 commits into from
Oct 17, 2020
Merged

Port tests to Dotty (the 2nd) #3636

merged 18 commits into from
Oct 17, 2020

Conversation

larsrh
Copy link
Contributor

@larsrh larsrh commented Oct 17, 2020

Supersedes #3552.

Lots of the ground work done by @LukaJCB. I just added a few commits.

@smarter writes:

M1 should be out next week, the milestone date hasn't been updated

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).

@larsrh larsrh mentioned this pull request Oct 17, 2020
@larsrh larsrh requested a review from LukaJCB October 17, 2020 10:33
@codecov-io
Copy link

Codecov Report

Merging #3636 into master will decrease coverage by 0.04%.
The diff coverage is 85.71%.

@@            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     

@larsrh larsrh merged commit 51ac3ef into master Oct 17, 2020
@larsrh larsrh deleted the dotty-tests-redux branch October 17, 2020 12:40
@larsrh larsrh added this to the 2.3 milestone Oct 31, 2020
Comment on lines +29 to +36
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)))
}
}
Copy link
Contributor

@satorg satorg Oct 12, 2022

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.

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants