Bug 2012 – Another IFTI case that probably should work

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-04-19T04:57:00Z
Last change time
2015-06-09T01:14:38Z
Keywords
rejects-valid
Assigned to
nobody
Creator
samukha

Comments

Comment #0 by samukha — 2008-04-19T04:57:50Z
void foo(T, U)(U u) { } void foo(T, A...)(A a) { } //import std.math; void main() { int x, y; // a foo!(int)(x); // b foo!(int)(x, y); } (a) should instantiate the first template (and it actually does if the second template is commented out). (b) should instantiate the second template.
Comment #1 by yebblies — 2011-06-10T02:38:07Z
This seems to work in dmd2.053, the following prints: a b ------------ void foo(T, U)(U u) { pragma(msg, "a"); } void foo(T, A...)(A a) { pragma(msg, "b"); } //import std.math; void main() { int x, y; // a foo!(int)(x); // b foo!(int)(x, y); }