Bug 8678 – Wrong processing of Complex!double as function argument

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2012-09-17T08:42:00Z
Last change time
2012-12-12T02:58:15Z
Assigned to
nobody
Creator
maximzms

Comments

Comment #0 by maximzms — 2012-09-17T08:42:08Z
All examples are executed with rdmd 2.060 on 64-bit Linux system Example 1: ---------- import std.stdio; struct Foo(T) { T a, b; } void foo(Foo!double a, double x) { writeln(a); } void main() { foo(Foo!double(0, 1), 2); } ---------- Output: ---------- Foo!(double)(0, 0) ---------- Example 2: ---------- import std.stdio; import std.complex; void foo(Complex!double a, double x) { writeln(a); } void main() { foo(Complex!double(0, 1), 2); } ---------- Output: ---------- 0+0i ---------- Error also occurs for "float". No error for "real" and "int".
Comment #1 by maximzms — 2012-12-12T02:58:15Z
Everything works well with DMD v2.061 from GitHub.