- 115design,
- 75Informatique,
- 67Typographie,
- 65Logiciels,
- 60opensource,
- 53LaTeX,
- 48science,
- 42web2.0,
- 41logiciel,
- 40sécurité
May
22
2012
Mar
20
2012
-
Clearly it's not just mutable fields that make covariant types unsound. The problem is more general. It turns out that as soon as a generic parameter type appears as the type of a method parameter, the containing class or trait may not be covariant in that type parameter.
-
The new definition gives append a type parameter U, and with the syntax, "U >: T", defines T as the lower bound for U. As a result, U is required to be a supertype of T.[1] The parameter to append is now of type U instead of type T, and the return value of the method is now Queue[U] instead of Queue[T].
- 2 more annotation(s)...
Top Tags
View All Recent Tags (11)
- 17séance8,
- 17cloud,
- 10efficacité énergétique,
- 10livre,
- 9sécurité,
- 8centre de calcul,
- 8séance6,
- 8lecture,
- 7mobile,
- 7séance5,
- 6notes de cours
Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »
Join Diigo