D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4676 - Overload resolution rejects valid code when mixing variadics, non-variadics
Summary: Overload resolution rejects valid code when mixing variadics, non-variadics
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2010-08-18 19:55 UTC by David Simcha
Modified: 2010-08-27 20:57 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description David Simcha 2010-08-18 19:55:58 UTC
Possibly related to 4652.

void doNothing(T...)(T args, string str) {}
void doNothing(T...)(T args) {}

void main() {
    doNothing(1, 2, 3);
}

test9.d(56): Error: template test9.doNothing(T...) doNothing(T...) matches more than one template declaration, test9.d(52):doNothing(T...) and test9.d(53):doNothing(T...)
Comment 1 Don 2010-08-18 22:29:27 UTC
(In reply to comment #0)
> Possibly related to 4652.

Indeed it is. My patch for 4652 (which isn't complete, there's still cases it fails for) fixes this one as well.
Comment 2 Walter Bright 2010-08-27 20:57:38 UTC
http://www.dsource.org/projects/dmd/changeset/635