Reputation: 40558
In Java I have an interface with generic types defined like this:
public interface A extends B<C & D> {
...
}
How would the combined generic type of C & D
be expressed in Scala? I've tried:
A <: B[C & D]
but it obviously gives me a compile error.
Upvotes: 2
Views: 120
Reputation: 28056
The syntax is C with D
. Check http://docs.scala-lang.org/tutorials/tour/compound-types.html for more info.
Upvotes: 5