Bug 13090 – Type inferring fails at function parameters with parameterized alias

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2014-07-10T17:46:39Z
Last change time
2018-04-17T16:09:10Z
Assigned to
No Owner
Creator
NCrashed

Comments

Comment #0 by NCrashed — 2014-07-10T17:46:39Z
``` import std.stdio; alias vec3(E) = Vec!(E, 3); struct Vec(E, size_t n) { E[n] elements; } void foo(E)(vec3!E v) //void foo(E)(Vec!(E, 3) v) that compiles { } void main() { foo(vec3!float([1, 2, 3])); } ``` Compilation error: ``` source/app.d(18): Error: template app.foo cannot deduce function from argument types !()(Vec!(float, 3LU)), candidates are: source/app.d(10): app.foo(E)(vec3!E v) ```
Comment #1 by NCrashed — 2014-07-10T17:47:31Z
Checked versions: 2.065 and 2.066-b2 Platform: 3.14.9-200.fc20.x86_64
Comment #2 by ag0aep6g — 2018-04-17T16:09:10Z
*** This issue has been marked as a duplicate of issue 10884 ***