www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10305] New: Make array operations output type the same as the input one for fixed sized arrays

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

           Summary: Make array operations output type the same as the
                    input one for fixed sized arrays
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs eml.cc 2013-06-08 14:51:41 PDT ---
This issue is borderline between an enhancement request and a bug report.


void main() {
    double[3] a;
    pragma(msg, typeof(a[] ^^ 2));
    float[3] b;
    pragma(msg, typeof(b[] ^^ 2));
}


Output:
double[]
float[]


But I think the output should be:
double[3]
float[3]


Keeping the static information of the length of the array is useful for small
arrays for successive better optimizations.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 08 2013