Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
object ImplicitOrder extends App{
implicit val implicitIntInstance1: Instance[String] = Instance("Implicit Instance in Same Conjure")
def getString(implicit implicitInstance: Instance[String]): String = implicitInstance.value
import Imported.implicitIntInstance1
println(getString)
}
case class Instance[T](value: T)
object Instance {
implicit val implicitIntInstance1: Instance[String] = Instance("Implicit Instance in Companion Object")
}
object Imported {
implicit val implicitIntInstance1: Instance[String] = Instance("Implicit Instance in imported")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.