http://d.puremagic.com/issues/show_bug.cgi?id=4953



--- Comment #3 from Don <clugd...@yahoo.com.au> 2010-09-30 09:47:34 PDT ---
Wow. This is a lot more general than I thought. Consider this code:


void foo(T = void)(short x) {}

void main()
{
  foo(5);
}

This compiled in 2.030, failed in 2.031 and later.

However, if you change 'short' to 'long', it works.

It's because of mtype.c,  TypeBasic::implicitConvTo(), line 3010.

Implicit conversion to a smaller size is disallowed. That's fine in general,
but shouldn't be true of template deduction.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to