Search code examples
c#javaoopprogramming-languagescovariance

What languages support covariance on inherited methods' return types?


I originally asked this question, but in finding an answer, discovered that my original problem was a lack of support in C# for covariance on inherited methods' return types. After discovering that, I became curious as to what languages do support this feature.

I will accept the answer of whoever can name the most.

EDIT: John Millikin correctly pointed out that lots of dynamic languages support this. To clarify:

I am only looking for static/strongly typed languages.


Solution

    • C++
    • Java
    • REALbasic
    • Eiffel
    • Sather
    • Modula-3