www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12946] New: Problems with floating point ^^ at compile time

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

          Issue ID: 12946
           Summary: Problems with floating point ^^ at compile time
           Product: D
           Version: unspecified
          Hardware: x86
                OS: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: bearophile_hugs eml.cc

void main() {
    import std.math;
    enum x = 2.0 ^^ 1.5;
}


dmd 2.066alpha gives:

...\dmd2\src\phobos\std\math.d(4012,47): Error: Cannot convert &real to ushort*
at compile time
...\dmd2\src\phobos\std\math.d(5078,18):        called from here: isNaN(y)
...\dmd2\src\phobos\std\math.d(5250,16):        called from here:
impl(cast(real)x, cast(real)y)
test.d(3,14):        called from here: pow(2.00000, 1.5)

--
Jun 19 2014