Summary: compiler should inform as "... can't return lvalue "
                    but crush because of Internal error
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-10-21 01:35:20 PDT ---
I think it should be informed as
 " width(height) can not return lvalue. "

dmd(2.060) returned 
 " Internal error: ../ztc/cgcs.c 343 "

the example is follows:

class C{
    private int[2] mysize; 

    // The wrong spelling of "mysize".
    // but is not error but crash.
    auto ref width(){    return this.size[0];    }
    auto ref height(){    return this.size[1];    }

    // getter and setter 
        int[2] size(){    return this.mysize;    }
        int[2] size( in int[2] xy ){
            this.mysize = xy;
            return xy;

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

Reply via email to