www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6914] New: wrong function of an overload set printed on argument mismatch

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6914

           Summary: wrong function of an overload set printed on argument
                    mismatch
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: mrmocool gmx.de



void foo(const char[] a) {}

void foo(int i) {}

void main()
{
    size_t i;
    foo(i);
}

$ dmd -run test.d 
DMD v2.056 DEBUG
test.d(8): Error: function test.foo (const const(char[]) a) is not callable
using argument types (ulong)
test.d(8): Error: cannot implicitly convert expression (i) of type ulong to int


Little bit misleading.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 08 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6914


Denis Shelomovskij <verylonglogin.reg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |verylonglogin.reg gmail.com



16:07:57 MSK ---
A note: example from the description is compiled in 64 bit code as you can see
from the error: `...of type ulong to int`. So consider `size_t` == `ulong`.

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