Content deleted Content added
→Function types: Fixed unmatched parentheses |
|||
Line 110:
== Inheritance in object-oriented languages ==
When a subclass [[Method overriding|overrides]] a method in a superclass, the compiler must check that the overriding method has the right type. While some languages require that the type exactly matches the type in the superclass (invariance
<gallery perrow="5" heights="190" caption="Variance and method overriding: overview">
|