Skip to content

Fix problem with class shadowing on 2.13.2+ #5

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 1 commit into from
Mar 21, 2020

Conversation

ybasket
Copy link

@ybasket ybasket commented Mar 19, 2020

Starting from Scala 2.13.2, it is no longer allowed to define an inner class with the same name as an inner class in the super class of the outer: scala/bug#8353

As context-applied generates such class names when you extend a class which has a context bound with the same name, it generates a warning, for example in profunktor/redis4cats#244. This PR fixes that by appending the outer class' name to make it unique.

Includes as well:

  • Update Scala to 2.13.1
  • Update kind-projector to 0.11.0

To reproduce the problem itself, do the following:

  1. Fix kind-projector to "org.typelevel" % "kind-projector_2.13.1" % "0.11.0"
  2. Open a sbt session
  3. set ThisBuild/resolvers += "scala-integration" at "https://scala-ci.typesafe.com/artifactory/scala-integration/"
  4. ++2.13.2-bin-53ba87a!
  5. compile - fails on the new test in shadowed.scala

Includes as well:
* Update Scala to 2.13.1
* Update kind-projector to 0.11.0
@augustjune
Copy link
Owner

augustjune commented Mar 21, 2020

That's an excellent PR, @ybasket!
Thank you 👍

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.

2 participants