Summary: regression(DMD 2.059head) Wrong error on forward
                    reference to 'front' with -property switch
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-04-04 10:56:44 PDT ---
The following code does not compile with DMD 2.059head, when passed the
-property switch.

int[] array;
pragma(msg, typeof(array.front));
@property ref T front(T)(T[] a){return a[0];}

Moving the declaration of front to the top fixes the error. This was reduced
from a template matching failure (std.algorithm.canFind cannot be instantiated
with built-in array types).

The same code compiles fine with DMD 2.058.

Another manifestation of what looks like the same issue:
pragma(msg, typeof(x)); // prints 'int' instead of 'const(int)'
const int x;

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to