Bug 11085 – Refused power vector operation of composed expression
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2013-09-21T05:52:00Z
Last change time
2013-11-20T03:48:12Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2013-09-21T05:52:49Z
import std.math;
void main() {
double[3] a, b, c;
b[] = a[] ^^ 2; // OK
c[] = (a[] + b[]) * 2; // OK
c[] = (a[] + b[]) ^^ 2; // Error
}
DMD 2.064 alpha gives:
test.d(6): Error: incompatible types for ((a[] + b[]) ^^ (cast(double)2)): 'double[]' and 'double'
(Another problem is that the exponent should not be converted to double.)
Comment #1 by yebblies — 2013-11-20T03:48:12Z
You hit this bug a lot, huh?
*** This issue has been marked as a duplicate of issue 10306 ***