Contra Variance

last modified: April 7, 2005

Opposite of CoVariance (see ContraVsCoVariance).

A class system where an overridden method in a SubClass may only accept parameters of the same class or a SuperClass of the corresponding parameter in the original method. Can be proven typesafe at compile-time by a typechecker (whereas argument CoVariance cannot).


Loading...