www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16127] New: array op cache conflates incompatible functions


          Issue ID: 16127
           Summary: array op cache conflates incompatible functions
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

cat > bug.d << CODE
static immutable float[16] window;

void bug()
    short[16] buffer;
    float[16] res;
    res[] = buffer[] * window[]; // float[] = short[] * immutable(float)[]
    const float[] win = window[];
    res[] = buffer[] * win[]; // float[] = short[] * const(float)[]

bug.d(9): Error: function bug._arraySliceOfsSliceMulSliceAssign_f (float[] p2,
const(immutable(float)[]) p1, const(short[]) p0) is not callable using argument
types (float[], const(float)[], short[])

This is most likely an issue with the cache for the generated functions, but
will also be fixed when switching to templated array ops.

Also see:
issue 15619

Jun 05 2016