classplus extends Annotation with StaticAnnotation
Type annotation that serves as an alternative way of expressing existential types (types with wildcards) with
higher bounds in the symbol DSL.
For example, imagine you want to allow invoking insert method on all lists of type
java.util.List[_ <: Number]. Unfortunately, the following will NOT work:
Type annotation that serves as an alternative way of expressing existential types (types with wildcards) with higher bounds in the symbol DSL.
For example, imagine you want to allow invoking insert method on all lists of type java.util.List[_ <: Number]. Unfortunately, the following will NOT work:
Scala typechecker will report an error on l.insert _ because this method cannot be called when the element type of the list is unknown.
To overcome this limitation, you can use alternative syntax to express the same: