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

           Summary: Variant opArithmetic does not attempt float conversion
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: callumena...@gmail.com


--- Comment #0 from callumena...@gmail.com 2012-09-18 13:27:20 PDT ---
Variant tries to mimic D's built-in rules for arithmetic 
conversions but:

import std.variant, std.stdio;
void main()
{
  auto v1 = Variant(4.5f);
  auto v2 = Variant(3.5f);
  writeln((v1+v2).type()); // double (should be float)
}

The reason is Variant doesn't try to convert to float in 
opArithmetic. I have submitted a pull request fixing this.

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

Reply via email to