We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
probably the same as #401 (not sure)
While working on some examples with @guihardbastien, we can see with this code when the recursion fails: https://scastie.scala-lang.org/ahoy-jon/ijmFz87ESKO2vr6Syf3qRw/13
import language.experimental.macros, magnolia1._ trait Tc[T] trait TcObj[T] extends Tc[T] object ShowDerivation { type Typeclass[T] = Tc[T] def join[T](ctx: CaseClass[Tc, T]): TcObj[T] = new TcObj[T] {} def split[T](ctx: SealedTrait[Tc, T]): TcObj[T] = new TcObj[T] {} def gen[T]: Tc[T] = macro Magnolia.gen[T] def genObj[T]: TcObj[T] = macro Magnolia.gen[T] } sealed trait A case object B extends A case class C(next:A) extends A ShowDerivation.gen[B.type] //success ShowDerivation.genObj[B.type] //success ShowDerivation.gen[A] //success //ShowDerivation.genObj[A] //failure /* type mismatch; found : Playground.ShowDerivation.Typeclass[Playground.A] (which expands to) Playground.Tc[Playground.A] required: Playground.TcObj[Playground.A] */ implicit val tca:Tc[A] = null ShowDerivation.gen[C] //success ShowDerivation.genObj[C] //success
The text was updated successfully, but these errors were encountered:
No branches or pull requests
probably the same as #401 (not sure)
While working on some examples with @guihardbastien, we can see with this code when the recursion fails: https://scastie.scala-lang.org/ahoy-jon/ijmFz87ESKO2vr6Syf3qRw/13
The text was updated successfully, but these errors were encountered: