http://d.puremagic.com/issues/show_bug.cgi?id=2755
Summary: ICE on invalid ref returns in linked objects: Assertion failure: 'type' on line 6566 in file 'expression.c'. No ICE or error if invalid code is local to the file. Product: D Version: 2.025 Platform: PC OS/Version: Windows Status: NEW Keywords: ice-on-invalid-code Severity: minor Priority: P3 Component: DMD AssignedTo: bugzi...@digitalmars.com ReportedBy: sandf...@jhu.edu An internal compiler error (ICE) occurs when an invalid ref return defined in another object (i.e. linked) is accessed. This error disappears (and no warning given) if the invalid ref returns are in the same object. Specifically Assertion failure: 'type' on line 6566 in file 'expression.c' is reported and then an abnormal program termination occurs. Test code --- module a; import b; void main() { myClass mc; myStruct ms; mc.self; // ICE ms.self; // ICE myFunc(); // ICE } --- module b; class myClass { ref self() { return this; } } struct myStruct { ref self() { return this; } } int y = 0; ref myFunc() {return y;} --