Re: auto return type inheritance not covariant

2011-02-02 Thread bearophile
iLewis: > Maybe this has been brought up before, but i could find no previous > submissions. It looks like a bug fit for Bugzilla: class Foo { int fun1() { return 1; } auto fun2() { return 1; } auto fun3() { return 1; } } class Bar : Foo { override auto fun1() { return 1; }

Re: auto return type inheritance not covariant

2011-02-02 Thread Jonathan M Davis
On Wednesday, February 02, 2011 15:31:02 iLewis wrote: > Maybe this has been brought up before, but i could find no previous > submissions. > > the following code compiles with the error "Error: function xxx.B.fn of > type () overrides but is not covariant with xxx.A.fn of type ()" even > though t

auto return type inheritance not covariant

2011-02-02 Thread iLewis
Maybe this has been brought up before, but i could find no previous submissions. the following code compiles with the error "Error: function xxx.B.fn of type () overrides but is not covariant with xxx.A.fn of type ()" even though they both return an auto of type int... is this a bug or oversight b