[Issue 18069] New: Exponentiation operator ^^ not evaluable at compile time
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Dec 12 15:40:14 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=18069
Issue ID: 18069
Summary: Exponentiation operator ^^ not evaluable at compile
time
Product: D
Version: D2
Hardware: x86_64
OS: Mac OS X
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: n8sh.secondary at hotmail.com
Following code does not compile but should:
```
void main(string[] args)
{
import std.stdio;
enum e = (1.0f / 255.0f) ^^ (1.0f / 2.2f);
writeln("e = ", e);
}
```
Error is:
/usr/local/opt/dmd/include/dlang/dmd/std/math.d(440): Error: y.vu[4] is used
before initialized
/usr/local/opt/dmd/include/dlang/dmd/std/math.d(413): originally
uninitialized here
/usr/local/opt/dmd/include/dlang/dmd/std/math.d(4107): called from here:
floorImpl(x)
/usr/local/opt/dmd/include/dlang/dmd/std/math.d(2373): called from here:
floor(x + 0.5L)
/usr/local/opt/dmd/include/dlang/dmd/std/math.d(2110): called from here:
exp2Impl(x)
/usr/local/opt/dmd/include/dlang/dmd/std/math.d(6743): called from here:
exp2(yl2x(x, y))
/usr/local/opt/dmd/include/dlang/dmd/std/math.d(6756): called from here:
impl(cast(real)x, cast(real)y)
test.d(5): called from here: pow(0.00392157, 0.454545)
Forum thread:
https://forum.dlang.org/thread/wbxaefufzeytvjkjfpyv@forum.dlang.org
--
More information about the Digitalmars-d-bugs
mailing list