blob: a5b7d6bf8fbe7b81d856d9455b826a46e0ee03a8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
import scala.language.implicitConversions
case class A(b: Int, c: String)
object Test extends dotty.runtime.LegacyApp {
implicit def s2i(s: String): Int = s.length
implicit def toA[T](t: T)(implicit f: T => Int): A = A(f(t), t.toString)
println("asdf".copy(b = 3))
}
|