blob: b1d1f3c2e59523677467022439f4aec49abe85db (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
import scala.language.implicitConversions
import scala.language.reflectiveCalls
import scala.reflect.runtime.universe._
object Test extends dotty.runtime.LegacyApp {
class A[T]
class B[T]
implicit def foo[T: TypeTag](a: A[T])(implicit b: B[T]): AnyRef{def baz: reflect.runtime.universe.Type} = new { def baz = typeOf[T] }
implicit def bar[T <: Int]: B[T] = new B[T]()
println(new A[Int]().baz)
}
|