$ cat O.scalatrait In {type Out}def f[O, I <: In { type Out = O }](i: I) {}def g[I <: In](i: I) = f[I#Out, I](i: I)$ scala O.scala/home/mikhail.vorozhtsov/O.scala:8: error: type arguments [I#Out,I] do not conform to method f's type parameter bounds [O,I <: this.In{type Out = O}]def g[I <: In](i: I) = f[I#Out, I](i: I)^one error found
def f[O, I <: In](i: I)(implicit w: I#Out =:= O) {}
You can do:
def f[I <: In](i: I) {}
Or something like:
def f[I <: In](i: I)(implicit ev: I#Out =:= Int) { }
Not sure what you try to achieve here.
Regards,
Rüdiger
2011/3/22 Mikhail Vorozhtsov <mikhail.v...@gmail.com>: