www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10656] New: support array operations for complex arrays

http://d.puremagic.com/issues/show_bug.cgi?id=10656

           Summary: support array operations for complex arrays
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: thelastmammoth gmail.com


--- Comment #0 from thelastmammoth gmail.com 2013-07-16 17:45:52 PDT ---
import std.complex;
void main(){
  version(a1)
    auto a=[complex(0,0)];//Error: incompatible types for ((a[]) / (2)):
'Complex!(double)[]' and 'int'
  else version(a2)
    auto a = [0 + 0.0i];//Error: incompatible types for ((a[]) / (2)):
'cdouble[]' and 'int'
  else version(a3)
    auto a = [0.0];
  else static assert(0);

  //auto b=a[]+2.0; // Error: Array operation a[] + 2.00000 not implemented
(a3) or incompatible types for ... (a1/a2)
  a[]*=2;
}

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