[Issue 3797] Regression(2.038): Implicit conversion between incompatible function pointers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 6 20:05:42 PDT 2011


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



--- Comment #15 from yebblies <yebblies at gmail.com> 2011-06-06 20:01:10 PDT ---
The reason this happens is because TypeFunction does not override constConv. 
When called on TypeFunction, TypeNext::constConv is actually called, which only
compares the return type. (next in TypeFunction is the return type)

I've created a possible fix in dmd pull 88 which defines
TypeFunction::constConv to disallow most implicit conversions between function
pointers.

The current patch allows reasonable purity, safety and nothrow conversions.  If
you're interested, please take a look and see if all cases are covered.

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


More information about the Digitalmars-d-bugs mailing list