[Issue 7820] New: regression(DMD 2.059head) Wrong error on forward	reference to 'front' with -property switch
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Apr  4 10:56:09 PDT 2012
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=7820
           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
        AssignedTo: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch
--- Comment #0 from timon.gehr at gmx.ch 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
    
    
More information about the Digitalmars-d-bugs
mailing list