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

--- Comment #0 from 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:
------- You are receiving this mail because: -------

Reply via email to