scalaz-deriving icon indicating copy to clipboard operation
scalaz-deriving copied to clipboard

Limit when companion extends FunctionN

Open mrdziuban opened this issue 5 years ago • 0 comments

This allows the annotation plugin to be used for classes with multiple parameter groups or with implicit parameters. Scala doesn't extend FunctionN in these cases resulting in an error like this:

@deriving(Foo) case class Multi(str: string)(val int: Int)
// [error] object creation impossible, since method apply in trait Function1 of type (v1: String)

This also adds the option to pretty print the AST when debugging, which I found useful, but I'm also happy to back out that change if others don't find it useful.

mrdziuban avatar Apr 26 '19 15:04 mrdziuban