www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1003] New: Weird error messages for duplicate function definitions

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

           Summary: Weird error messages for duplicate function definitions
           Product: D
           Version: 1.007
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: maxter i.com.ua


<code>
char[] foo(char[] str)
{
        return str;
}

char[] foo(char[] str)
{
        return str;
}

void main()
{
        mixin(foo("int bar;"));
}
</code>

test.d(20): function test.foo called with argument types:
        (char[8])
matches both:
        test.foo(char[])
and:
        test.foo(char[])

The message for the run-time evaluated functions is no less weird. Remove
mixin(foo("int bar;")); and you get this from the linker: 
Error 1: Previous Definition Different : _D4test3fooFAaZAa


-- 
Feb 23 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1003


Stewart Gordon <smjg iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bdom.pub+deebugz gmail.com


--- Comment #1 from Stewart Gordon <smjg iname.com> 2010-12-03 17:37:30 PST ---
*** Issue 5312 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 03 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1003


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |z_hossain icmail.net


--- Comment #2 from yebblies <yebblies gmail.com> 2011-06-10 09:15:15 PDT ---
*** Issue 2703 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 10 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1003


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs eml.cc


--- Comment #3 from yebblies <yebblies gmail.com> 2011-06-10 09:15:19 PDT ---
*** Issue 4680 has been marked as a duplicate of this issue. ***

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