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

Polymorphic function optimizer, some other cases

Open sir-wabbit opened this issue 7 years ago • 1 comments

~~It doesn't yet work in some cases like~~

object A {
  val foo = new Obj {
    def foo[A]: Foo[A] = ...
  }
}

~~or~~

trait Obj {
  def foo[A]: Foo[A] = ...
}
object A extends Obj

EDIT: works in both cases.

sir-wabbit avatar Jun 26 '18 16:06 sir-wabbit

The only remaining case is

object A {
  val a = new C // not a refinement
}
class C {
  def foo[A]: Foo[A] = ...
}

sir-wabbit avatar Jun 28 '18 20:06 sir-wabbit