On Tue, 28 Jul 2015 08:50:53 +0200 Daniel Kozák <ko...@dlang.cz> wrote:
> > On Tue, 28 Jul 2015 02:16:56 +0000 > "lobo" <swampl...@gmail.com> wrote: > > I would say it is a compiler bug. > > consider this: > > bool some(real x, real y) { > return true; > } > > bool some(float x, float y) { > return true; > } > > void main() { > some(4.0L, 4.0L); // ok > some(4L,4L); // this should implicit convert to real,real > } > > but: > > //m.d(11): Error: m.some called with argument types (long, long) > matches both: //m.d(1): m.some(real x, real y) //and: //m.d(5): > m.some(float x, float y > > It is in confrontance with TDPL p.44 figure 2.3 OTOH D has same behaviour as C++