blob: dce1267165c1cb9f63824b3b1c5a747ff76dfde9 (
plain) (
tree)
|
|
import scala.language.implicitConversions
object Test extends dotty.runtime.LegacyApp {
class Rep[T](x : T)
class SomeOps[T](x : Rep[T]) { def foo = 1 }
implicit def mkOps[X, T](x : X)(implicit conv: X => Rep[T]) : SomeOps[T] = new SomeOps(conv(x))
val a: Rep[Int] = new Rep(42)
println(a.foo)
}
|