Bug 8325 – IFTI on non-function templates

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-06-30T07:53:00Z
Last change time
2014-09-14T13:18:33Z
Keywords
accepts-invalid, wrong-code
Assigned to
nobody
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2012-06-30T07:53:44Z
DMD 2.059: template X(){ double X(double){return 2;} float X(float){return 3;} } static assert(!is(typeof(X(2)))); // fail static assert(is(typeof(X!()(2.0f)) == float)); // fail static assert(is(typeof(X(2.0))==double)); // ok static assert(is(typeof(X(2.0f))==float)); // fail All static assertions should pass. IFTI should not have any other effect than implicit template instantiation if the template in question contains more than one declaration.
Comment #1 by verylonglogin.reg — 2012-11-04T22:40:18Z
The second one passes now.
Comment #2 by yebblies — 2013-11-26T07:56:17Z
They all pass now.
Comment #3 by k.hara.pg — 2014-09-14T13:18:33Z
*** This issue has been marked as a duplicate of issue 10083 ***