milessabin / export-hook

Minimal infrastructure for type class providers to support the inclusion of derived, subclass and other orphan instances in their implicit scope.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to compile when importing types with more than one type parameter

nrinaudo opened this issue · comments

Trying to use @imports on types that have more than one type parameter fails to compile.

For example, see the following code:

import aliases._
import export.imports

object aliases {
  type StringEncoder[D] = MyEncoder[String, D]
}

trait MyEncoder[E, D] {
  def encode(d: D): E
}

@imports[StringEncoder]
trait LowPriorityStringEncoders

object StringEncoder extends LowPriorityStringEncoders

This yields wrong number of type arguments for MyEncoder, should be 2.