www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8587] New: Missing line number or wrong error message with ^^ of array

http://d.puremagic.com/issues/show_bug.cgi?id=8587

           Summary: Missing line number or wrong error message with ^^ of
                    array
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



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'

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 25 2012