[Issue 2268] Hijacking of non-templated functions by templated functions should not be allowed.

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2268

Andrei Alexandrescu and...@erdani.com changed:

   What|Removed |Added

Version|2.017   |D2

--


[Issue 2268] Hijacking of non-templated functions by templated functions should not be allowed.

2009-05-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2268


David Simcha dsim...@yahoo.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #4 from David Simcha dsim...@yahoo.com  2009-05-13 09:29:01 PDT 
---
Works in 2.030, but see bug 2972.  I think the fix caused this bug.

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


[Issue 2268] Hijacking of non-templated functions by templated functions should not be allowed.

2009-01-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2268


s...@iname.com changed:

   What|Removed |Added

 CC||s...@iname.com
Version|2.023   |2.017




--- Comment #3 from s...@iname.com  2009-01-30 20:44 ---
The rule around here is that the version field should be set to the _oldest_
version in which the bug has been observed.

http://tinyurl.com/avzytb


-- 



[Issue 2268] Hijacking of non-templated functions by templated functions should not be allowed.

2009-01-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2268


dsim...@yahoo.com changed:

   What|Removed |Added

   Severity|major   |critical
   Keywords||diagnostic
Version|2.017   |2.023




--- Comment #2 from dsim...@yahoo.com  2009-01-25 22:11 ---
Upgrading to critical and incrementing version because this bug still exists,
I've been bitten by this several times now, and each time it's quite confusing.
 Also, the following example actually does give a proper error message, because
instantiation of std.algorithm.find succeeds, and then DMD realizes that it
conflicts with std.string.find:

import std.algorithm, std.string;

void main() {
auto i = find(foobar, 'f');
}


The root of the problem, then, is that DMD tries to instantiate any template
functions that match the name of the function being called before outputting a
name conflict error message.  If the instantiation of these templates fails,
then DMD fails with error messages related to its attempt at instantiating the
template, rather than either silently using the non-template function (probably
a bad idea) or failing with a name conflict error message (the right thing). 
Instead, DMD should fail *before* trying to instantiate the template function
whose name conflicts with the non-template function, if they are not in the
same overload set.


--