I’m not sure what you want to accomplish. One option is to write class Dyn[A, MyFD <: FD[A]](...)
. Then you can use the concrete type of A inside Dyn
. If you want to constrain A too, you can write class Dyn[A <: A1, MyFD <: FD[A]](...)
.
--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I actually have several types A, so I cannot use that. The one option I thought of was to use a trait with
type MyFD[A] <: FD[A]
The underlying reason is to make my implementation of FD a value class, and avoid creating it, so methods in the class Dyn should have types the specific implementation and not FD[A]. Presently I have FD[A], and that code is logically correct.
Thanks
Siddhartha