[Issue 9327] New: alias this declaration and unknown identifiers lead to segmentation fault
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 16 11:04:20 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9327
Summary: alias this declaration and unknown identifiers lead to
segmentation fault
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: tvwhite51 at gmail.com
--- Comment #0 from tvwhite51 at gmail.com 2013-01-16 11:04:18 PST ---
If two classes alias this each other and their is an unknown identifier DMD
will fail with segmentation fault: 11. This is on DMD 2.061, Mac OS X 10.8.2.
Example:
class foo {
bar fun;
alias fun this;
this() {
fun = new bar(this);
fun.a = 5; //remove this line and the program will compile.
}
}
class bar {
foo sun;
alias sun this;
this(foo t) {
sun = t;
}
}
void main() {
foo fun = new foo;
}
--
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