[Issue 7097] New: opDollar doesn't work with slicing
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sun Dec 11 09:24:43 PST 2011
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=7097
           Summary: opDollar doesn't work with slicing
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dsimcha at yahoo.com
--- Comment #0 from David Simcha <dsimcha at yahoo.com> 2011-12-11 09:24:42 PST ---
struct S {
    @property size_t length() const {
        return 1;
    }
    S opSlice(size_t lower, size_t upper) { assert(0); }
    alias length opDollar;
}
void main() {
    S s;
    auto num = s[0..$];
}
test9.d(13): Error: undefined identifier __dollar
-- 
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