www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8678] New: Wrong processing of Complex!double as function argument

reply d-bugmail puremagic.com writes:
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



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: -------
Sep 17 2012
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8678


Maksim Zholudev <maximzms gmail.com> changed:

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



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: -------
Dec 12 2012