[Issue 6684] New: Wrong code for null-initializing a class with alias this.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Sep 17 02:23:12 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6684
Summary: Wrong code for null-initializing a class with alias
this.
Product: D
Version: D2
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: timon.gehr at gmx.ch
--- Comment #0 from timon.gehr at gmx.ch 2011-09-17 02:22:42 PDT ---
class Foo{
string bar;
alias bar this;
}
void main(){
Foo foo = null; // segmentation fault at runtime
}
The compiler attempts to assign to foo's 'bar' field, instead of initializing
the class reference with zero. That always results in a segmentation fault.
--
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