[Issue 8861] New: compiler should inform as "... can't return lvalue " but crush because of Internal error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Oct 21 01:35:38 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8861
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
AssignedTo: nobody at puremagic.com
ReportedBy: hotcocoamix at gmail.com
--- Comment #0 from hotcocoamix at gmail.com 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
@property{
int[2] size(){ return this.mysize; }
int[2] size( in int[2] xy ){
this.mysize = xy;
return xy;
}
}
}
--
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