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: [email protected]
Reporter: [email protected]
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-@nogc function
'std.complex.Complex!double.Complex.opBinary!("^^", int).opBinary'
test.d(5,15): Error: @nogc function 'D main' cannot call non-@nogc function
'std.complex.abs!double.abs'
--