[Issue 415] conflicting template functions overloads

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 21 15:40:17 PST 2006


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


bugzilla at digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID




------- Comment #5 from bugzilla at digitalmars.com  2006-11-21 17:40 -------
The language is working as defined. All the examples have easy solutions. Let's
take the last one:
void tfunc()(int a) { 
}

void test() {   
  tfunc!()(cast(uint) 2);  // OK
  tfunc(cast(uint) 2); // IFTI breakage
}

Fix:

void tfunc(T)(T a) { 
}

Or:

void tfunc()(int a) { }
void tfunc(dummy=void)(uint a) { }


-- 




More information about the Digitalmars-d-bugs mailing list