On Wed, Aug 12, 2009 at 10:22 AM, Jarrett Billingsley<jarrett.billings...@gmail.com> wrote: > On Wed, Aug 12, 2009 at 9:18 AM, Ary Borenszweig<a...@esperanto.org.ar> wrote: >> This compiles and runs in D2: >> >> -- >> import std.stdio; >> >> auto foo() { >> return 1; >> } >> >> void main() { >> writefln("%s", foo()); >> } >> -- >> >> Since when a non-templated function can have its return type deduced? :) > > Cool. I'm testing this and it really does seem to be non-templated. > So of course, the first thing I tried was this: > > class A > { > auto foo() { return 0; } > } > > class B : A > { > auto foo() { return 5; } > } > > but DMD crashes. :P
Reported: http://d.puremagic.com/issues/show_bug.cgi?id=3247