Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



#scala #variances
The annotation +T declares type T to be used only in covariant positions.
If you want to change selection, open document below and click on "Move attachment"

Variances - Scala Documentation
= sys.error("no element on stack") override def toString() = "" } object VariancesTest extends App { var s: Stack[Any] = new Stack().push("hello"); s = s.push(new Object()) s = s.push(7) println(s) } <span>The annotation +T declares type T to be used only in covariant positions. Similarly, -T would declare T to be used only in contravariant positions. For covariant type parameters we get a covariant subtype relationship regarding this type parameter. For our exa


Summary

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Details



Discussion

Do you want to join discussion? Click here to log in or create user.