Bug 12671 – std.complex abs and ^^ @nogc

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-04-27T23:11:00Z
Last change time
2014-05-26T11:57:28Z
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2014-04-27T23:11:07Z
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'
Comment #1 by bearophile_hugs — 2014-05-26T11:57:28Z
Now it works (fixed by Walter).