[Issue 12671] New: std.complex abs and ^^ @nogc

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Apr 27 16:11:07 PDT 2014


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

          Issue ID: 12671
           Summary: std.complex abs and ^^ @nogc
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: Phobos
          Assignee: nobody at puremagic.com
          Reporter: bearophile_hugs at eml.cc

void main() @nogc {
    import std.complex;
    auto x = complex(1.0, 1.0);
    auto y = x ^^ 2;
    auto z = x.abs;
}


Gives with DMD 2.066alpha:

test.d(4,14): Error: @nogc function 'D main' cannot call non- at nogc function
'std.complex.Complex!double.Complex.opBinary!("^^", int).opBinary'
test.d(5,15): Error: @nogc function 'D main' cannot call non- at nogc function
'std.complex.abs!double.abs'

--


More information about the Digitalmars-d-bugs mailing list