Bug 8493 – template parameter extraction fails for types returned from templated function

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-08-02T07:41:00Z
Last change time
2013-02-10T09:11:43Z
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2012-08-02T07:41:43Z
struct S(int x, int y) { void fun(T)(T t) if (is(T U == S!(a, b), int a, int b)) { } } @property S!(a, b) s(int a, int b)() { return S!(a, b)(); } void main() { auto s1 = S!(1, 1)(); auto s2 = S!(2, 2)(); // comment out and you get errors auto s3 = s!(2, 2); s1.fun(s3); // ok } If the second line in main is commented out the call to fun() fails.
Comment #1 by andrej.mitrovich — 2013-02-10T09:11:43Z
Fixed in 2.061.