Skip to content
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

"Internal error: unable to find the outer accessor symbol of ..." when deriving instance for a nested type #449

Open
notxcain opened this issue Jan 14, 2023 · 3 comments

Comments

@notxcain
Copy link

Version: 1.12

Reproducer: https://scastie.scala-lang.org/lZwX8BQSThWjL8sEAnSPnw

@adamw
Copy link
Member

adamw commented Jan 14, 2023

Seems to be a problem with a combination of classes defined in traits + default field values

@notxcain
Copy link
Author

Yes, but it works if you put derivation inside the companion.

trait X {
  case class F(i: Int = 5)
  object F {
    implicit def tc: TC[F] = TC.derive[F]
  }
}

@ThijsBroersen
Copy link

Yes, but it works if you put derivation inside the companion.

trait X {
  case class F(i: Int = 5)
  object F {
    implicit def tc: TC[F] = TC.derive[F]
  }
}

Lifesaver! Thanks for the workaround.

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

No branches or pull requests

3 participants