https://issues.dlang.org/show_bug.cgi?id=12831

          Issue ID: 12831
           Summary: assert incorrectly fails on to!float conversion
           Product: D
           Version: D2
          Hardware: x86
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: [email protected]
          Reporter: [email protected]

import std.conv;

void main()
{
    float a = 1.234f;
    float b = to!float("1.234");
    assert (a == b);
    assert (a == to!float("1.234")); //fails
}

DMD32 D Compiler v2.066-devel-38c5c36

Works in gdc. Also works with real.

--

Reply via email to