Bug 8587 – Missing line number or wrong error message with ^^ of array
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-08-25T18:56:00Z
Last change time
2013-11-24T08:17:08Z
Keywords
diagnostic
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2012-08-25T18:56:25Z
void main() {
auto a = [10.0, 20.0, 30.0];
double[3] r;
r = a[] ^^ 2;
}
It gives no line number (DMD 2.061alpha):
Error: must import std.math to use ^^ operator
This is even worse:
void main() {
import std.stdio;
double[2] a = [1.0, 2.0];
double[2] b;
b = a[] ^^ 2;
}
It doesn't even tell what the problem is:
Error: undefined identifier 'std'
Comment #1 by yebblies — 2013-11-24T08:17:08Z
*** This issue has been marked as a duplicate of issue 9047 ***