September 17, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8678

           Summary: Wrong processing of Complex!double as function
                    argument
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: maximzms@gmail.com


--- Comment #0 from Maksim Zholudev <maximzms@gmail.com> 2012-09-17 08:42:08 PDT ---
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".

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 12, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8678


Maksim Zholudev <maximzms@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #1 from Maksim Zholudev <maximzms@gmail.com> 2012-12-12 02:58:15 PST ---
Everything works well with DMD v2.061 from GitHub.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------