Skip to content

Instantly share code, notes, and snippets.

View FabioPinheiro's full-sized avatar

Fabio Pinheiro FabioPinheiro

View GitHub Profile
@FabioPinheiro
FabioPinheiro / gist:d9dd5078074f9d469de31c31576453ba
Created January 3, 2019 10:40 — forked from milessabin/gist:1705644
Access to companion object of Foo via implicit resolution
trait Companion[T] {
type C
def apply() : C
}
object Companion {
implicit def companion[T](implicit comp : Companion[T]) = comp()
}
object TestCompanion {