Programming Languages and Compilers WS 2013/14 - Slide 612

Objectives:
Understand classes as types
In the lecture:
Explain
- type checking for dynamically bound method calls with
compile time information:
- x has type X,
- signature of m in X,
- m in Y safely overrides m in X;
Questions:
- Why would overridden methods not be type safe if they had "covariant" parameters (all 3 arrows between the classes X and Y would point up)? That is the situation in Eiffel.
©2009 by Prof. Dr. Uwe Kastens
Generiert mit Camelot | Probleme mit Camelot? | Geändert am: 07.10.2013