Release D 2.082.0

Shigeki Karita shigekikarita at gmail.com
Tue Sep 4 03:56:25 UTC 2018


On Sunday, 2 September 2018 at 01:05:10 UTC, Martin Nowak wrote:
> Glad to announce D 2.082.0.
>
> This release comes with more efficient update functions for 
> associative arrays, unsafe code in debug blocks, UDAs for 
> function parameters, an improved dependency resolution and 
> avoidance of online update checks for dub, and signed Windows 
> binaries.
>
> http://dlang.org/download.html 
> http://dlang.org/changelog/2.082.0.html
>
> -Martin

I found changes in std.math make some codes not working anymore

https://dlang.org/changelog/2.082.0.html#math_float_double_implementations

// working in 2.081.2, not 2.082.0
import std.math;
import std.stdio;

void main() {
     static d = exp(-1.0);
}

// error in 2.082.0
/home/skarita/dlang/dmd-2.082.0/linux/bin64/../../src/phobos/std/math.d(2360): Error: static variable P cannot be read at compile time
/home/skarita/dlang/dmd-2.082.0/linux/bin64/../../src/phobos/std/math.d(2360):        called from here: poly(xx, P)
/home/skarita/dlang/dmd-2.082.0/linux/bin64/../../src/phobos/std/math.d(2221):        called from here: expImpl(x)
/home/skarita/dlang/dmd-2.082.0/linux/bin64/../../src/phobos/std/math.d(2225):        called from here: exp(cast(real)x)
./test.d(5):        called from here: exp(-1)
Failed: ["/home/skarita/dlang/dmd-2.082.0/linux/bin64/dmd", "-v", 
"-o-", "./test.d", "-I."]

Is there any workaround to avoid this?


More information about the Digitalmars-d-announce mailing list