Thread overview
[Issue 676] New: These two funcs shouldn't conflict
Dec 12, 2006
d-bugmail
Jan 01, 2007
d-bugmail
Jan 04, 2007
d-bugmail
Apr 09, 2007
d-bugmail
Jul 14, 2010
Don
December 12, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=676

           Summary: These two funcs shouldn't conflict
           Product: D
           Version: 0.177
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: davidl@126.com


alias  uint Handle;
extern(C)
{
void  function  (Handle, byte, wchar*, uint) udat_applyPattern ;
}
void udat_applyPattern(Handle h, byte b, wchar[] wc, uint ui)
{
        udat_applyPattern(h,b,cast(wchar*)wc,ui);
}

void main()
{
}


-- 

January 01, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=676


thomas-dloop@kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
         OS/Version|Windows                     |All




------- Comment #1 from thomas-dloop@kuehne.cn  2007-01-01 10:35 -------
These aren't 2 functions but a function and a pointer to function. To get the intended functionality replace

void  function  (Handle, byte, wchar*, uint) udat_applyPattern ;

with

void udat_applyPattern  (Handle, byte, wchar*, uint);

I've changed the severity from "normal" to "enhancement" as the original issue is currently illegal D but also an interesting use case.


-- 

January 04, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=676


davidl@126.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |minor




------- Comment #2 from davidl@126.com  2007-01-04 01:34 -------
umm , shouldn't call it an enhancement. it's more important than an enhancement at least it's around minor level. and it breaks existing code


-- 

April 09, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=676


davidl@126.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|minor                       |normal




------- Comment #3 from davidl@126.com  2007-04-09 04:31 -------
simplified case:

extern void  function  (char*) udat_applyPattern ;
void udat_applyPattern(char[] wc)
{
        udat_applyPattern(cast(char*)wc);
}

void main()
{
}

i think it's about the completeness of the dmd function type calling system and
the completeness of type matching system.
so I remark it as normal level


-- 

July 14, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=676


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug@yahoo.com.au
           Severity|normal                      |enhancement


--- Comment #4 from Don <clugdbug@yahoo.com.au> 2010-07-14 13:18:55 PDT ---
This is not a bug. There aren't two functions, just one function and a
variable.
Note that if this was allowed, you could reasonably expect a struct with static
opCall to work, as well. And then you ask why _any_ type or variable cannot
overload a function. Add properties into the mix -- it'd be a disaster.

I think this bug should be closed as invalid.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 26, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=676


Andrei Alexandrescu <andrei@metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei@metalanguage.com
         AssignedTo|nobody@puremagic.com        |bugzilla@digitalmars.com


--- Comment #5 from Andrei Alexandrescu <andrei@metalanguage.com> 2010-11-26 13:26:52 PST ---
I'll leave the decision to Walter.

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