Inferred return types

Martin Nowak dawg at dawgfoto.de
Fri Jun 29 16:25:34 PDT 2012


> class Foo
> {
>      auto foo ()
>      {
>          return "Foo";
>      }
> }
>
> class Bar : Foo
> {
>      auto foo ()
>      {
>          return "Bar";
>      }
> }
>
Ouch, what a terrible idea to base a class hierachy on inference.
But nonetheless covariance checking should be performed after inference.


More information about the Digitalmars-d mailing list