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: nob...@puremagic.com
        ReportedBy: maxim...@gmail.com


--- Comment #0 from Maksim Zholudev <maxim...@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: -------

Reply via email to